Commit Graph

866 Commits

Author SHA1 Message Date
Tom Lane c446802b22 Fix syntax error reported by old shells ("if ! command..." is a
neologism, apparently).
2000-03-25 18:46:17 +00:00
Bruce Momjian 1aecb8d2ff More >&1 cleanups 2000-03-25 14:44:42 +00:00
Bruce Momjian 3df65f8499 More changes of >& to 2>&1 2000-03-25 14:36:58 +00:00
Bruce Momjian 6e801bd8db Remove >& and make it 2>&1 2000-03-25 14:32:50 +00:00
Bruce Momjian d825e55c13 Update pg_dumpall again. 2000-03-22 05:25:06 +00:00
Bruce Momjian 233a52eaff Fix pg_dumpall for new psql output. 2000-03-22 05:10:22 +00:00
Bruce Momjian 52d0265736 it seems in the beta2 release DBUSERID in pg_dumpall is the _name_ of the
user, so it doesn't need to be translated from the number to the name.

also ``create database ...'' does not take numbers for the encoding, so
the ENCODING variable does not need to be translated to a number, but left
as the text representation.  a patch is supplied to make the changes i
have found to work.  i was successful dumping and reloading my database
after these changes.
-

John M. Flinchbaugh
2000-03-19 02:19:43 +00:00
Peter Eisentraut 7d392f257b Fixed psql -c "\slashcmd" 2000-03-18 22:48:29 +00:00
Tom Lane f945f46193 Modify lexing of multi-char operators per pghackers discussion around
16-Mar-00: trailing + or - is not part of the operator unless the operator
also contains characters not present in SQL92-defined operators.  This
solves the 'X=-Y' problem without unduly constraining users' choice of
operator names --- in particular, no existing Postgres operator names
become invalid.

Also, remove processing of // comments, as agreed in the same thread.
2000-03-18 18:03:12 +00:00
Tom Lane 0e314d747e Add safety check on expression nesting depth. Default value is set by
a config.h #define, and the runtime value can be controlled via SET.
2000-03-17 05:29:07 +00:00
Thomas G. Lockhart 6456810078 Implement column aliases on views "CREATE VIEW name (collist)".
Implement TIME WITH TIME ZONE type (timetz internal type).
Remap length() for character strings to CHAR_LENGTH() for SQL92
 and to remove the ambiguity with geometric length() functions.
Keep length() for character strings for backward compatibility.
Shrink stored views by removing internal column name list from visible rte.
Implement min(), max() for time and timetz data types.
Implement conversion of TIME to INTERVAL.
Implement abs(), mod(), fac() for the int8 data type.
Rename some math functions to generic names:
 round(), sqrt(), cbrt(), pow(), etc.
Rename NUMERIC power() function to pow().
Fix int2 factorial to calculate result in int4.
Enhance the Oracle compatibility function translate() to work with string
 arguments (from Edwin Ramirez).
Modify pg_proc system table to remove OID holes.
2000-03-14 23:06:59 +00:00
Tatsuo Ishii 44a9639123 Detect postmaster being ready by calling psql -l rathern than
checking postmaster.pid. It's not enough to check the existence
of postmaster.pid since DB recovery might be running.
2000-03-14 08:34:47 +00:00
Peter Eisentraut a1642089bf Fixed deficiency where an unterminated (no semicolon) command at end of
psql script would be dropped silently.
2000-03-13 13:46:32 +00:00
Peter Eisentraut 1d75298176 Karel Zakr's revised patch to fix psql prompt for local host connections. 2000-03-11 13:56:24 +00:00
Bruce Momjian f43ec05d05 I've made a diff against the 7.0beta1 tree that accomplishes several things:
1) adds NetBSD shared lib support on both ELF and a.out platforms

        2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
           Makefile.global.  This makes it much easier to build stuff in
           the source tree after you've already installed the libraries.

        3) adds TEMPLATEDIR in Makefile.global that indicates where the
           database templates are stored.  This separates the template files
           from real libraries that are installed in $(LIBDIR).
        4) changes include order of <readline/readline.h> and <readline.h>.
           The latest GNU readline installs its headers under a readline
           subdirectory.

In addition to applying the patch below the following files need to be copied:

        backend/port/dynloader:
                bsd.h -> netbsd.h
                bsd.c -> netbsd.c
        include/port:
                bsd.h -> netbsd.h
        makefiles:
                Makefile.bsd -> Makefile.netbsd

It would be great to see this incorporated into the source tree before
the 7.0 release is cut.

        Thanks!

     -- Johnny C. Lam <lamj@stat.cmu.edu>
2000-03-08 01:58:46 +00:00
Bruce Momjian 326e2155d9 Hi Peter,
I try change prompt in the psql, but it is set '.' (as '%m') for
non-TCP/IP
connection. This small patch try use uname() information for non-TCP/IP
instead '.'.

                                        Karel
2000-03-08 01:38:59 +00:00
Bruce Momjian 91124a2f66 Fix problems with pg_upgrade found by Kardos, Dr. Andrea 2000-03-07 23:09:34 +00:00
Peter Eisentraut 8de482a847 Added configure test for readline's filename_completion_function
Completed psql's \? help
2000-03-05 13:30:20 +00:00
Peter Eisentraut c75adac757 More fixes for psql ^C handling, especially during copy. Still doesn't
cope so well with copy to but that will have to wait for the next release.

Also added -X option to prevent reading .psqlrc startup file.
2000-03-01 21:10:05 +00:00
Tom Lane ed0e292354 Clean up dependencies for version.o.
This avoids the useless rebuild of pg_version that used to happen on
each build or install pass.
2000-02-27 01:33:43 +00:00
Tom Lane 01eea27c4c Fix a couple of inconsistent usages of include <...> vs. include "...". 2000-02-27 01:10:31 +00:00
Tom Lane cbf4c9671e psql's \d command wasn't doing the right things with 'char' (type 18)
fields, nor with bpchar and varchar fields that have typmod -1.  The
latter effectively have an unspecified length, so I made them display
as char() and varchar() rather than falsely equating them to char(1)
and varchar(1).
2000-02-26 18:31:25 +00:00
Bruce Momjian c969e2662f 1. miscadmin.h needs to include sys/types.h for a definition of pid_t
2. Regression tests fail for types int2 and int4 (which can easily be
fixed by adding entries to resultmap) aswell as float8 and geometry,
where floating point numbers appear to be rounded a little differently
than in your expected results (besides that I also need the positive
zeros file). I'm including a patch for the first 2, but I don't know
whether the latter two are actually a bug in postgres or a bug in the
OS or even allowed difference. I'm including my results for reference.

Rolf Grossmann
2000-02-23 15:46:15 +00:00
Peter Eisentraut c8009959c9 Fixed psql's Control-C handling when COPY in progress 2000-02-21 19:40:42 +00:00
Tatsuo Ishii 320d3e06ee Fixes for \encoding command.
1) freeing null pointer
	2) invalid encoding info may be stored into psql variable
	3) fix indentation
2000-02-21 02:05:12 +00:00
Peter Eisentraut 718bb2cc9c Moved psql \eset and \eshow to \encoding
Improved psql's Ctrl-C handling
Fixed configure test for sigsetjmp that now even recognizes it if it's a macro
2000-02-20 14:28:28 +00:00
Tom Lane e79b2dd5e7 Fix missing \n in some psql_error calls. 2000-02-20 02:37:40 +00:00
Tatsuo Ishii eb089e7f76 Add new backslash command \eset and \eshow. 2000-02-19 05:01:16 +00:00
Tatsuo Ishii c239c11a63 Fix compiler warning 2000-02-19 04:59:30 +00:00
Bruce Momjian a52692213c README not needed anymore. 2000-02-16 21:26:00 +00:00
Bruce Momjian 988d53e5ea include cleanup 2000-02-16 13:22:00 +00:00
Bruce Momjian 78693c89d7 Clean up include files use in psql. 2000-02-16 13:15:26 +00:00
Tom Lane b1577a7c78 New cost model for planning, incorporating a penalty for random page
accesses versus sequential accesses, a (very crude) estimate of the
effects of caching on random page accesses, and cost to evaluate WHERE-
clause expressions.  Export critical parameters for this model as SET
variables.  Also, create SET variables for the planner's enable flags
(enable_seqscan, enable_indexscan, etc) so that these can be controlled
more conveniently than via PGOPTIONS.

Planner now estimates both startup cost (cost before retrieving
first tuple) and total cost of each path, so it can optimize queries
with LIMIT on a reasonable basis by interpolating between these costs.
Same facility is a win for EXISTS(...) subqueries and some other cases.

Redesign pathkey representation to achieve a major speedup in planning
(I saw as much as 5X on a 10-way join); also minor changes in planner
to reduce memory consumption by recycling discarded Path nodes and
not constructing unnecessary lists.

Minor cleanups to display more-plausible costs in some cases in
EXPLAIN output.

Initdb forced by change in interface to index cost estimation
functions.
2000-02-15 20:49:31 +00:00
Peter Eisentraut 9672d38f91 Adjusted psql echoing options (-a and -e) 2000-02-13 21:45:15 +00:00
Peter Eisentraut 2fb0ff0c5b Default argument for createdb
Changed EXIT_ON_ERROR to ON_ERROR_STOP in psql
2000-02-10 20:08:58 +00:00
Bruce Momjian 566c05c31a Here is the patch to add plperl to droplang.
Mark Hollomon
2000-02-09 20:23:26 +00:00
Bruce Momjian ecd8537376 I checked the WinNT port yesterday (a few days old snapshot from CVS) and I
am including a patch to get it compile.

changes to psql:
- added less as default pager when compiling on Cygwin
- need to declare "filename_completion_function" because it is not exported
from readline -> added to include/port/win.h

changes to pg_id:
- include of <getopt.h>
- add .exe when installing

I think there is a problem with calling the regress tests on WinNT - it
should be called with PORTNAME not HOST as the parameter to regress.sh or
the check  when to add "-h localhost" to psql has to be changed. Now it is
checked against the PORTNAME.

The results of the regress tests were OK with expected failures ;-)

Daniel Horak
2000-02-09 16:23:44 +00:00
Peter Eisentraut 9e34883565 Fixed broken initdb --show patch 2000-02-09 00:21:49 +00:00
Bruce Momjian 1cc7e40c80 yesterday I had a problem with initdb. I set bad environment values
and initdb crashs (I set pglib path to PG 6.5.3 directory instead to
7.0 and initdb take this BKI old templates ... (initdb not check
BKI version and BKI files not has any version comments (TODO?))

 This patch add to the initdb --show option which show setting of all
initdb's values. It spare developers time if in setting is bug.

                                                Karel

----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-02-08 15:58:54 +00:00
Peter Eisentraut 9ceb5d8a7b Fixed psql double quoting of SQL ids
Fixed libpq printing functions
2000-02-07 23:10:11 +00:00
Jan Wieck f1acd900ad Disable/reenable triggers for data only dump.
Jan
2000-02-07 16:30:58 +00:00
Tatsuo Ishii 2bda7a4406 change copyright year 1999->2000
Minor fix
2000-02-07 04:31:10 +00:00
Tatsuo Ishii 418b270020 Fix a bug when specfying -D option.
fix suggested by Keith Parks.
2000-02-06 00:49:03 +00:00
Tatsuo Ishii b304b4a90e Change function name PQclientencoding to PQclientEncoding since
it seems more suitable for the naming convention in libpq.
2000-02-05 12:27:56 +00:00
Jan Wieck ddd596d386 Added ALTER TABLE ... ADD CONSTRAINT (provided by Stephan Szabo).
Added constraint dumping capability to pg_dump (also from Stephan)

Fixed DROP TABLE -> RelationBuildTriggers: 2 record(s) not found for rel
error.

Fixed little error in gram.y I made the last days.

Jan
2000-02-04 18:49:34 +00:00
Peter Eisentraut 2ea31fabe7 *** empty log message *** 2000-02-02 13:20:15 +00:00
Peter Eisentraut 2b84cbb60f A few minor psql enhancements
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
2000-01-29 16:58:54 +00:00
Bruce Momjian 3f0074e403 fix for compile. 2000-01-27 05:33:51 +00:00
Bruce Momjian 2d5dd7557b Update files. 2000-01-26 16:10:01 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Peter Eisentraut bdb41ad0e7 Made abstime/reltime use int4 instead of time_t (TODO item)
Made type equivalency apply to aggregates (TODO item)
Fixed parsing bug in psql
Reverted some stupid options changes I made to pg_dump
2000-01-24 19:34:19 +00:00
Tatsuo Ishii b2ff7d08ad Change format of postmaster.opts.default.
Executable file name (postmaster) no more included in the file.
2000-01-23 08:20:24 +00:00
Peter Eisentraut 49581f9848 updated install file
updated date/time types doc
fixed small psql bug
removed libpq code that lower-cased db names
make notice when long identifier is truncated
2000-01-23 01:27:39 +00:00
Peter Eisentraut fa5400c0a4 added ALTER TABLE DROP COLUMN, early version 2000-01-22 14:20:56 +00:00
Tom Lane 7cc0d6ae9d Fix tab-complete so it works with old versions of readline that don't
have the rl_completion_append_character variable.  The tab completion
behavior doesn't seem to be quite perfect in that situation, but it's
better than failing to build at all...
2000-01-21 23:32:36 +00:00
Tom Lane e33f550bc0 Fix handleCopyIn's response to EOF seen mid-line, that is, input file
does not end with a newline.  I don't think this explains the recent
complaints, since this bug existed in 6.5 (and probably long before).
But might as well fix it now that I see it.
2000-01-21 04:21:12 +00:00
Peter Eisentraut 13f8875017 Added new pg_id to fix initdb problems
New INSTALL file
Fixed a copyright notice
2000-01-20 21:51:09 +00:00
Bruce Momjian e6ed9f2c75 Fix typo in \z. 2000-01-20 15:29:20 +00:00
Bruce Momjian 2317e714c8 Update pg_dumpall. 2000-01-19 20:10:27 +00:00
Peter Eisentraut 65e0051843 another round of user interface cleanups
removed pg_id
fixed a few bugs in the scripts
2000-01-19 20:08:36 +00:00
Peter Eisentraut 533d516629 Removed MBFLAGS from makefiles since it's now done in include/config.h. 2000-01-19 02:59:03 +00:00
Peter Eisentraut f565cf41ab another set of cleanups 2000-01-18 23:30:24 +00:00
Bruce Momjian 0cb6bc70ce Hi!
Here is a patch to bring both libpq and psql to a state where it compiles on
win32 (native) again. A lot of things have changed, and I have not been able
to keep up with them all, so it has been broken for quite a while.
After this patch, at least it compiles. It also talks "basic talk" to the
server, but I have not yet tested all things. Sending queries, and using
e.g. \d or \dt works fine. The rest will have to be tested further.
It also bumps the version on libpq.dll to 7.0.

Everything should be enclosed in #ifdef WIN32, unless I have missed
something. Except for one or maybe two places where I have moved a #include
that should not be used on win32 from the "global area" into a "#ifndef
WIN32 area".


//Magnus
2000-01-18 19:05:31 +00:00
Bruce Momjian 2eebcddeaa Bruce,
Attached is a patch which patches cleanly against the Sunday afternoon
snapshot. It modifies pg_dump to dump COMMENT ON statements for
user-definable descriptions. In addition, it also modifies comment.c so
that the operator behavior is as Peter E. would like: a comment on an
operator is applied to the underlying function.

Thanks,

Mike Mascari
2000-01-18 18:09:02 +00:00
Tom Lane 4cd086ce43 Fix quoting bugs and incorrect trigger argument printout. 2000-01-18 07:29:58 +00:00
Tatsuo Ishii 449b4cc177 Show encoding name rather than encoding id in case of psql -l. 2000-01-18 05:11:38 +00:00
Peter Eisentraut 28125ed5e0 Updated user interfaces on initdb, initlocation, pg_dump, ipcclean to a GNU-compliant'ish state.
Made ipcclean work on Linux.
2000-01-18 00:03:37 +00:00
Tom Lane fdc85f50a3 Put back change to 'connection failed' message formatting that someone
overwrote.
2000-01-16 20:34:54 +00:00
Peter Eisentraut 759fba4873 Included all yacc and lex files into the distribution. 2000-01-16 20:05:00 +00:00
Tom Lane 97e82dc72c Clean up pg_dump coredumps caused by change of output formatting for
oidvector/int2vector.  pg_dump code was assuming that it would see
exactly FUNC_MAX_ARGS integers in the string returned by the backend.
That's no longer true.  (Perhaps that change wasn't such a good idea
after all --- will it break any other applications??)
2000-01-16 03:54:58 +00:00
Peter Eisentraut 2a1bfbce24 - Allow array on int8
- Prevent permissions on indexes
- Instituted --enable-multibyte option and tweaked the MB build process where necessary
- initdb prompts for superuser password
2000-01-15 18:30:35 +00:00
Tatsuo Ishii bfbd58ce13 Adapt to the changes of libpq(eliminateing using putenv()). 2000-01-15 05:38:50 +00:00
Peter Eisentraut 7c9390caa1 Fixed psql variables vs array syntax, as well as minor psql enhancements 2000-01-14 22:18:03 +00:00
Peter Eisentraut 4ceb2d0cb6 * User management commands no longer user pg_exec_query_dest -> more robust
* Let unprivileged users change their own passwords.

* The password is now an Sconst in the parser, which better reflects its text datatype and also
forces users to quote them.

* If your password is NULL you won't be written to the password file, meaning you can't connect
until you have a password set up (if you use password authentication).

* When you drop a user that owns a database you get an error. The database is not gone.
2000-01-14 22:11:38 +00:00
Tom Lane 0e6d72db55 Make PSQLexec's behavior on loss of connection more reasonable;
report original error before attempting reset, not after.
2000-01-14 05:28:31 +00:00
Tom Lane 19ff2e4d55 Make connection-failed messages a little friendlier on
80-column displays...
2000-01-14 04:01:55 +00:00
Peter Eisentraut bfa3b59d25 initdb didn't load pg_description 2000-01-13 18:22:10 +00:00
Peter Eisentraut f6689a328f Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions. 2000-01-12 19:36:36 +00:00
Tatsuo Ishii 267c6c7f06 Multi-byte case fix by Oliver Elphick (olly@lfix.co.uk) 2000-01-12 13:08:55 +00:00
Bruce Momjian 8a093d0ae3 Make number of args to a function configurable. 2000-01-10 17:14:46 +00:00
Bruce Momjian 6456b17bc1 Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions. 2000-01-10 16:13:23 +00:00
Bruce Momjian a040281787 Move fixes for >8 indexed fields. 2000-01-10 05:20:26 +00:00
Tatsuo Ishii 359652898b Add more portability to echo -n (code stolen from createlang)
Do not start postmaster if postgres is running
2000-01-09 12:06:52 +00:00
Bruce Momjian 5633e22e2c Update pg_dumpall for new psql format. 2000-01-06 21:16:18 +00:00
Bruce Momjian b78769fda2 Fix it's and its to be correct. 2000-01-05 18:23:54 +00:00
Bruce Momjian eb9bb3de33 Make psql \dT always show descriptions. There is room. 1999-12-31 21:06:19 +00:00
Bruce Momjian e9bfedc9bc Fix length limit, MikeA 1999-12-27 18:21:07 +00:00
Bruce Momjian 635498623d Hi, all,
This is the patch for the final bit.  Sorry that it's separate.

Cheers...


MikeA
1999-12-27 15:45:04 +00:00
Bruce Momjian 24a0f021ef Hi, all
I finally got around to schlepping through pg_dump, to finish what I started
about three months (or more) ago.  Attached is a gzipped diff file to apply
in the bin/pg_dump directory.  This should remove all string length
dependencies, except one, which I'm working on.  It has been through some
rudimentary unit testing, but that's about it, so if any of you would give
it a more strenuous run-through, I'd be grateful for the feedback.

Cheers...

 Ansley, Michael
1999-12-27 15:42:44 +00:00
Tatsuo Ishii e80ade5e22 Fix minor bug. 1999-12-22 04:41:17 +00:00
Tatsuo Ishii e3736d2c3a Add installtion of postmaster.opts.default. 1999-12-22 04:23:31 +00:00
Tatsuo Ishii b680d5bec7 Add installation of pg_ctl
Locate path of postmaster in a portable way (stolen from initdb)
Add postmaster.opts.default.sample which should be copied into
$PGLIB in the installtion process. Also, it will be installed into
$PGDATA while initdb is running.
1999-12-22 04:12:55 +00:00
Bruce Momjian 665db209e5 Cleanup of effective username test. 1999-12-20 05:39:40 +00:00
Tom Lane ec806d72c0 Clean up some minor gcc warnings. 1999-12-20 01:34:19 +00:00
Bruce Momjian 095d83e129 Cleanup --alldb option handling. 1999-12-18 08:46:44 +00:00
Bruce Momjian d2cf8b4776 Cleanup vacuumdb 1999-12-18 08:39:12 +00:00
Bruce Momjian 1c2257648a > > It would be nice for new users; I think it would make it easier
> > for them to actually set out and do it.  Many new users are
> > of the not-so-knowledgable variety, and shell scripting isn't
> > something they want to undertake.
>
> Can someone modify the vacuumdb shell script to do that?
i tried it... it seems to work

neko@kredit.sth.sz
1999-12-18 08:34:50 +00:00
Bruce Momjian fd96e1754c Finally initdb.sh works. Was problem with assuming EUID was defined. 1999-12-18 04:04:24 +00:00
Bruce Momjian 12118301fd initdb cleanup 1999-12-18 03:31:14 +00:00
Bruce Momjian f08e8ae7cb initdb cleanup 1999-12-18 03:21:21 +00:00
Bruce Momjian a08eb45c52 More initdb cleanup 1999-12-18 02:56:01 +00:00
Bruce Momjian 24edd34da5 Cleanup of initdb.sh script to be portable, at least marginally. 1999-12-18 02:48:53 +00:00
Bruce Momjian 65f694f802 Add cvs. 1999-12-18 00:34:48 +00:00
Bruce Momjian 5c99f9cd84 Fix MULTIBYTE handling in string by using strcat. 1999-12-17 18:05:32 +00:00
Jan Wieck 219652d5f7 Okay, this is how it looks: Please apply the attached patch to the current
sources, otherwise this whole things fails anyway (fails to create the
views).

Peter Eisentraut

Manually applied - Jan
1999-12-17 16:53:11 +00:00
Bruce Momjian 4f73187bb7 ANother initdb cleanup 1999-12-17 03:46:33 +00:00
Bruce Momjian ac00256ceb initdb.sh fix from Peter. 1999-12-17 01:16:03 +00:00
Bruce Momjian 83bad7c063 This is my -- hopefully sufficiently portable -- attempt at cleaning out
initdb. No more obscure dependencies on environment variables or paths.
It
now finds the templates and the right postgres itself (with cmd line
options as fallback). It also no longer depends on $USER (su safe), and
doesn't advertise that --username allows you to install the db as a
different user, since that doesn't work anyway. Also, recovery and
cleanup
on all errors. Consistent options, clearer documentation.

Please take a look at this and adopt it if you feel it's safe enough. I
have simulated all the stupid circumstances I could think of, but you
never know with shell scripts.

Oh yeah, you can give the postgres user a default password now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-17 01:05:31 +00:00
Bruce Momjian 1b22a8cb03 Clear paren level flag on \r or any backslash command, rather than
keeping parenlevel unchanged.
1999-12-16 23:54:41 +00:00
Bruce Momjian 5ca971a18a Hi,
I sending promised patch with:

        * getopt_long() - for pg_dump (portable)

        * and "Usage: " changes in scripts in src/bin/
          - this changes are cosmetic only, not change any
          feature ...etc.

 All PostgreSQL routines (scripts) support now long options and
help's output is alike for all scripts and all support -? or --help.

                                                Karel

Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
1999-12-16 20:10:02 +00:00
Bruce Momjian 7585deb087 I have done the QNX4 port with the current source tree. The number of
backend/Makefiles to be patched could significantly be reduced since
they
have been adopted to the QNX4 needs.

Andreas Kardos
1999-12-16 01:25:23 +00:00
Bruce Momjian cb00b7faa5 I'm in TODO mood today ...
* Document/trigger/rule so changes to pg_shadow recreate pg_pwd

I did it with a trigger and it seems to work like a charm. The function
that already updates the file for create and alter user has been made a
built-in "SQL" function and a trigger is created at initdb time.

Comments around the pg_pwd updating function seem to be worried about
this
routine being called concurrently, but I really don't see a reason to
worry about this. Verify for yourself. I guess we never had a system
trigger before, so treat this with care, and feel free to adjust the
nomenclature as well.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-12 05:57:36 +00:00
Bruce Momjian 1ff0a475ee Fix for psql from Peter. 1999-12-11 21:35:49 +00:00
Bruce Momjian 298845a6f0 Allow ; in () in psql. 1999-12-11 01:03:36 +00:00
Bruce Momjian e639a1a6a8 This takes care of TODO item
* pg_dump should preserve primary key information

Also a couple of warnings removed.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-11 00:31:05 +00:00
Bruce Momjian 3c75d64f40 Remove old file. 1999-12-10 17:46:41 +00:00
Bruce Momjian 77a4729936 This should fix the \e (\p, \g, ...) behaviour on an empty query buffer.
Also, minor tweakage of tab completion, and I hope the output is flushed
on time now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-10 03:59:30 +00:00
Jan Wieck a27542c3a8 Added a fflush(stdout) to the \p command required for the
multisession test tool.

Jan
1999-12-10 00:26:35 +00:00
Bruce Momjian 469cf43fac Remove extra vacuum, from Peter. 1999-12-09 04:36:57 +00:00
Bruce Momjian 0dec669a0f Change $< to $+ in scripts Makefile, and clean up pg_encoding if logic. 1999-12-08 10:29:55 +00:00
Bruce Momjian a010be7543 Peter's file removals. 1999-12-07 22:43:03 +00:00
Bruce Momjian a0aab48fcd Okay, that should put us back in sync. These two patches (src & doc) are
against the sources from one hour ago and contain all the portable and
up
to date stuff.

A few other CVS "householding" things you might want to take care of:

* Remove the src/bin/cleardbdir directory

* Remove the file src/bin/psql/sql_help.h from the repository, as it is
a derived file and is build by the release_prep.

Peter Eisentraut
1999-12-07 22:41:44 +00:00
Tatsuo Ishii 8ad4f99b73 Fix the case of -o given 1999-12-06 08:49:00 +00:00
Tatsuo Ishii 8231a7ab20 Fix minor bugs 1999-12-06 08:35:34 +00:00
Tatsuo Ishii 5b912b089c pg_ctl: a script to start/stop/restart and report status of postmaster. 1999-12-06 07:23:41 +00:00
Bruce Momjian 81c0383295 Fix echo -n and read -r in scripts. 1999-12-05 20:52:54 +00:00
Bruce Momjian 60ae5ed037 Remove destroylang.sgml. 1999-12-05 20:29:18 +00:00
Bruce Momjian 66f8da0756 Update 1999-12-05 20:04:42 +00:00
Bruce Momjian ed62104ea9 I cleaned those out as well (the echo -n "bug" was in there ;) and moved
them into the scripts dir. I also added a --list option to show already
installed languages.

This whole moving and renaming totally confused CVS and my checked out
copy got completely fried last night. When you apply the source patch,
please make sure that all the directories src/bin/{create|destroy}* as
well as vacuumdb, cleardbdir are gone and that all the scripts (7) are
in
scripts/.

Meanwhile I am still puzzled about what happened with the docs patch.
Because I don't know what you got now, the second attachment contains
the
files

ref/allfiles.sgml
ref/commands.sgml
ref/createlang.sgml
ref/droplang.sgml
doc/src/sgml/Makefile

Peter Eisentraut                  Sernanders väg 10:115
1999-12-05 20:02:49 +00:00
Bruce Momjian 240e4c98f5 New scripts for create/drop user/db from Peter Eisentraut 1999-12-04 04:53:22 +00:00
Bruce Momjian 1f64926953 Fix compile error on older patch. 1999-11-30 04:29:57 +00:00
Bruce Momjian 47e51683e6 I pulled this one out via CVS, I hope you can make use of it:
Peter.
1999-11-29 05:28:11 +00:00
Tom Lane fb55fa0478 Remove obsolete note about pg_vlock lock file. 1999-11-28 02:17:43 +00:00
Tom Lane adbf98a77f Fix references to backend/port files so that they actually work. 1999-11-27 19:43:20 +00:00
Bruce Momjian a7f14616c6 Change // to /* */ 1999-11-26 17:26:38 +00:00
Bruce Momjian 09f185a040 Fix missing prototype psql warning. 1999-11-26 04:36:48 +00:00
Bruce Momjian 78bc83fedf * Includes tab completion. It's not magic, but it's very cool. At any
rate
  it's better than what used to be there.

* Does proper SQL "host variable" substitution as pointed out by Andreas
  Zeugwetter (thanks): select * from :foo; Also some changes in how ':'
  and ';' are treated (escape with \ to send to backend). This does
_not_
  affect the '::' cast operator, but perhaps others that contain : or ;
  (but there are none right now).

* To show description with a <something> listing, append '?' to command
  name, e.g., \df?. This seemed to be the convenient and logical
solution.
  Or append a '+' to see more useless information, e.g., \df+.

* Fixed fflush()'ing bug pointed out by Jan during the regression test
  discussion.

* Added LastOid variable. This ought to take care of TODO item "Add a
  function to return the last inserted oid, for use in psql scripts"
  (under CLIENTS)
  E.g.,
insert into foo values(...);
insert into bar values(..., :LastOid);
\echo $LastOid

* \d command shows constraints, rules, and triggers defined on the table
  (in addition to indices)

* Various fixes, optimizations, corrections

* Documentation update as well


Note: This now requires snprintf(), which, if necessary, is taken from
src/backend/port. This is certainly a little weird, but it should
suffice
until a source tree cleanup is done.

Enjoy.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-11-26 04:24:17 +00:00
Bruce Momjian fc955b14ea Add system indexes to match all caches.
Make all system indexes unique.
Make all cache loads use system indexes.
Rename *rel to *relid in inheritance tables.
Rename cache names to be clearer.
1999-11-22 17:56:41 +00:00
Tom Lane d8ba3dfb0b Change backend-side COPY to write files with permissions 644 not 666
(whoever thought world-writable files were a good default????).  Modify
the pg_pwd code so that pg_pwd is created with 600 permissions.  Modify
initdb so that permissions on a pre-existing PGDATA directory are not
blindly accepted: if the dir is already there, it does chmod go-rwx
to be sure that the permissions are OK and the dir actually is owned
by postgres.
1999-11-21 04:16:17 +00:00
Bruce Momjian 58d1eeaafe Fix for arm32 and fix for dbname with dash. 1999-11-18 21:47:41 +00:00
Bruce Momjian e61e4d460c Fix for psql control-d and .psqlrc that I broke. Fix for \dT with
descriptions enabled.
1999-11-13 19:16:47 +00:00
Bruce Momjian db12a63ef1 The \p\g fix didn't turn out to be so bad. It even works in other
circumstances:
=> select * from foo\x\t\pset border 0 \p\g\\select * from bar;

Also the release prep update so the sql_help.h is generated before
packaging.

Peter.
1999-11-13 02:04:54 +00:00
Bruce Momjian 2a24ec6f16 In the spirit of TODO item
* Add use of 'const' for varibles in source tree
(which is misspelled, btw.)
I went through the front-end libpq code and did so. This affects in
particular the various accessor functions (such as PQdb() and
PQgetvalue()) as well as, by necessity, the internal helpers they use.

I have been really thorough in that regard, perhaps some people will find
it annoying that things like
char * foo = PQgetvalue(res, 0, 0)
will generate a warning. On the other hand it _should_ generate one. This
is no real compatibility break, although a few clients will have to be
fixed to suppress warnings. (Which again would be in the spirit of the
above TODO.)

In addition I replaced some int's by size_t's and removed some warnings
(and generated some new ones -- grmpf!). Also I rewrote PQoidStatus (so it
actually honors the const!) and supplied a new function PQoidValue that
returns a proper Oid type. This is only front-end stuff, none of the
communicaton stuff was touched.


The psql patch also adds some new consts to honor the new libpq situation,
as well as fixes a fatal condition that resulted when using the -V
(--version) option and there is no database listening.


So, to summarize, the psql you should definitely put in (with or without
the libpq). If you think I went too far with the const-mania in libpq, let
me know and I'll make adjustments. If you approve it, I will also update
the docs.

        -Peter

--
Peter Eisentraut                  Sernanders vaeg 10:115
1999-11-11 00:10:14 +00:00
Bruce Momjian c6c60302ba Cleanup of psql \copyright 1999-11-10 01:22:37 +00:00
Bruce Momjian b2c55a02b1 psql makefile fix from Keith Parks 1999-11-08 15:59:59 +00:00
Bruce Momjian 86ef36c907 New NameStr macro to convert Name to Str. No need for var.data anymore.
Fewer calls to nameout.

Better use of RelationGetRelationName.
1999-11-07 23:08:36 +00:00
Bruce Momjian 17d819c093 Fix for recusive exit call from Massimo. 1999-11-06 17:01:29 +00:00
Bruce Momjian a9ade930da Sort help file names, from Peter Eisentraut 1999-11-06 16:49:06 +00:00
Bruce Momjian 5e3189eaff Update psql banner 1999-11-05 18:21:09 +00:00
Bruce Momjian f793ac0a16 Update psql display. 1999-11-05 15:44:57 +00:00