Commit Graph

7047 Commits

Author SHA1 Message Date
Bruce Momjian 59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian 075cede748 Add typdefs to pgindent run. 1997-09-08 20:59:27 +00:00
Bruce Momjian 319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian 1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian 868d708188 Add // comments. 1997-09-05 00:09:47 +00:00
Bruce Momjian 33b028b5b0 Fix syntax error in psql help. 1997-09-04 15:02:56 +00:00
Bruce Momjian 35378a4efc Fix syntax error. 1997-09-03 16:48:59 +00:00
Thomas G. Lockhart b776831e8b Rearrange scanning code to support extended comments.
Use #define symbols rather than integers for scanning states.
1997-09-01 06:09:53 +00:00
Bruce Momjian 99e9deac73 Manual page renaming. 1997-08-26 17:00:23 +00:00
Bruce Momjian 0bdd6d1e00 pg_passwd cleanup. 1997-08-25 23:28:04 +00:00
Bruce Momjian 86062218da pg_passwd cleanup. 1997-08-25 23:11:21 +00:00
Bruce Momjian c6e7baa7e1 pg_passwd cleanup 1997-08-25 20:00:03 +00:00
Bruce Momjian f8fda03d12 pg_password utility. Cleanup for psql passwords. New datetime contrib stuff for new version. Fix for strutils needing config.h. 1997-08-25 19:41:52 +00:00
Bruce Momjian e045278e7e Fix for no NULL in CREATE TABLE. 1997-08-22 17:15:41 +00:00
Bruce Momjian 7515bb484e Fix for psql pager when no tty, cleanup for vacuum attdisbursion type. 1997-08-22 04:13:18 +00:00
Bruce Momjian 76501c8aed Make psql use pager only when it has a tty. 1997-08-22 00:17:26 +00:00
Bruce Momjian f1edf02cc1 Change pg_attribute.attnvals to float4, change #ifdef 0 to #if 0, fix aix call to strNcpy, fix pg_super_user_id in pg_dumpall, change pg_database.dtadba from oid to int4. 1997-08-21 02:28:55 +00:00
Bruce Momjian 63fbdd358f Portability fix for pg_dumpall. 1997-08-20 15:06:48 +00:00
Bruce Momjian 1d8bbfd2e7 Make functions static where possible, enclose unused functions in #ifdef NOT_USED. 1997-08-19 21:40:56 +00:00
Vadim B. Mikheev b992e200b8 NOT NULL implementation (submitted by Robson Paniago de Miranda). 1997-08-19 04:46:15 +00:00
Marc G. Fournier 9d90de5de7 Changes so that it actually checks for <readline/history.h>, instead
of assuming it does exist
1997-08-17 00:48:51 +00:00
Bruce Momjian 6ed1715b1f Cleanup for NAMEDATALEN use. 1997-08-03 02:38:47 +00:00
Bruce Momjian 4b965f5758 Fix stout/stderr paging. Do not page \h select, but page \h *. 1997-08-01 04:07:55 +00:00
Bruce Momjian a67fd49091 Fix psql error output. 1997-08-01 03:33:02 +00:00
Bruce Momjian 461f80cf9a Add strerror to pg_version for sunos4. 1997-07-29 16:36:43 +00:00
Bruce Momjian fd6b3c26ef fix small memory free error. 1997-07-28 23:53:54 +00:00
Bruce Momjian 8447148aad psql: Add PAGER for \h and \?,\C fix, indices spell fix. 1997-07-24 20:01:33 +00:00
Bruce Momjian 4d8a5efcef Add single quotes to \\h set help 1997-07-24 19:11:53 +00:00
Bruce Momjian 9ad6e0db30 More pg_dump patch cleanups. 1997-07-23 17:42:25 +00:00
Bruce Momjian a7d417cc2f Fix problems with pg_dump for iheritance, sequences, archive tables. 1997-07-23 17:15:13 +00:00
Bruce Momjian 5eb4fadeaa Prevent psql optarg free-ing 1997-07-14 22:08:56 +00:00
Bruce Momjian a89f9731e9 Have pg_dumpall return proper status on exit 1997-07-12 15:57:31 +00:00
Bruce Momjian 43deb7a45f Fox case-sensitivity for \d and allow trailing ; on backslash commands. 1997-06-29 17:29:28 +00:00
Bruce Momjian 1952f15c5c Fix memory leak in psql. 1997-06-29 05:06:43 +00:00
Bruce Momjian 7e75f5e8b3 Small pg_dumpall cleanup. 1997-06-25 21:24:57 +00:00
Bruce Momjian a53d85404e pg_dump, pg_dumpall cleanups. 1997-06-21 16:08:17 +00:00
Bruce Momjian a75d6aaa41 Check pgdump return request. 1997-06-20 16:37:10 +00:00
Bruce Momjian dd2c410616 Allow pg_dump to preserve owners of all objects. 1997-06-20 02:20:26 +00:00
Bruce Momjian 8f846a321c Update psql EXPLAIN help description, from Thomas. 1997-06-12 16:43:08 +00:00
Marc G. Fournier 735bf0b7f2 From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] sequences display in psql

Well, I am away at Progress training (not Postgres!!) and desided to do
this patch during a break. This will allow listing of sequences in
addition to listing of tables and indicies:
\d would should indicies, tables, and sequences
\ds would show sequences only.
1997-06-11 01:03:38 +00:00
Bruce Momjian 5c34462d9c Make LO patter consistent with psql. 1997-06-07 05:29:22 +00:00
Bruce Momjian 51b03770d7 avoid xinv* table name conflict with large objects. 1997-06-07 05:19:06 +00:00
Marc G. Fournier e721e58c03 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] psql and large objects fix

Psql was broken by using "Inv[0-9]+" instead of "xin[xv][0-9]+" to not
show large object files.  Been this way for a long time too. Relic of
an older naming convention, perhaps?
1997-06-06 22:05:23 +00:00
Marc G. Fournier 8d1f52ef24 From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] More psql and libpq patches

Well..these would be the last patches until the release (I hope)...
I ran the regression tests while watching psql under purify, and it did
not leak even one byte.

In this patch:

* Plugged a major leak when PSQL reads files for input (either through
  \i options or through -f option)
* Fixed the one remaining leak in PSQL in not clearing PGresult *results
  everywhere it is supposed to. (Thanks Tymm)
* Fixed A small leak in PSQL not clearing all the PGsettings correctly.
* A not-so-obvious (but small) leak in Libpq when PQsetdb fails for any
  reason.
* Added \n to some Libpq error messages to make them easier to digest..
* Finally, added /* PURIFY */ comment to some of the code indicating
  the reason for why it was added/changed...for future developers.
1997-06-06 01:42:02 +00:00
Bruce Momjian a668b7ac2d Fix for large objects and case sensitivity, from Raymond Toy. 1997-06-05 22:59:45 +00:00
Vadim B. Mikheev 9d14ef9465 SET var TO '...'
^^ - added
1997-06-03 06:19:11 +00:00
Vadim B. Mikheev cd3f1bcab0 cc1: warnings being treated as errors
psql.c: In function `HandleSlashCmds':
psql.c:1141: warning: `optarg3' might be used uninitialized in this function
psql.c:1157: warning: `optarg3' might be used uninitialized in this function

-> char           *optarg3 = NULL;
1997-06-03 06:17:34 +00:00
Bruce Momjian 09e41a037e Update man and psqlHelp for new SET GEQO=# option. 1997-06-02 14:12:40 +00:00
Marc G. Fournier 541f18558d From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] patch for a memory leak

Well...I screwed up and posted the wrong patch for psql originally..
The patch for that patch wposted below will fix it..
1997-06-02 03:04:50 +00:00
Marc G. Fournier 8445ccd57a From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] Another destroydb patch

This is a patch to my previous destroydb patch cause some people wanted
slightly different behavior. After this patch is applied, destroydb
will destroy a database as usual, but if added -i flag (which could be
aliased like rm -i) would ask for confirmation.
1997-06-02 02:53:00 +00:00
Marc G. Fournier f9f98e3aff From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] pg_dump memory leak patch

This patch fixes a HUGE memory leak problem in pg_dump.
Pretty much anything that was allocated was never freed and Purify
reported about 40% possible memory leak and 6% actual leak. I added
functions to clear out all the allocated structures. After the patch
Purify returns 0 for number of bytes leaked...
1997-06-02 02:52:06 +00:00
Marc G. Fournier ff038a5b97 From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] psql - \dt,\di commands.

I sent this a couple of months ago in re a request by Maxim
Kozin, but I had the patch reversed, creating some confusion
over applying it.

Here's a more complete version.

Adds \dt to list only tables/views and \di to list only
indicies.  \d will still work as before.
1997-06-01 15:53:24 +00:00
Marc G. Fournier 3903296b2a From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] destroydb patch

I am including a patch for destroydb to ask for confirmation before
deleting databases (after I accidentally deleted mine)...destroydb -y
would force delete without any confirmation.
1997-06-01 15:40:08 +00:00
Marc G. Fournier 9a5529f4d1 From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] memory leak patches in libpq and psql

A couple of small memory leak patches (detected with Purify) primarily
in libpq.

* Fixed (NULL) border problem in psql (run psql, do \m, then select
  something from a table...row separators will be nulls)
* Fixed memory leak with the abovementioned border not being freed
  properly.
* Fixed memory leak in freePGconn() not freeing conn->port
* Fixed up PQclear() to free parts of PGresult only if these
  parts are not null.
* Fixed a decent memory leak that occured after executing every command
  in psql. PGresult *results was not freed most of the time.

There is still a leak being detected (2 bytes) in readline functions, but
I think this is old readline library. I will install new one and test it.
1997-06-01 15:39:08 +00:00
Bruce Momjian 6c82ae2c02 Add R_PLANS to psql help, and SET cleanup. 1997-06-01 04:53:44 +00:00
Bruce Momjian 6ed9f2f17b DROP agg psql help change from Darren. 1997-06-01 04:32:41 +00:00
Bruce Momjian 098dea8633 Fix core dump on \c. 1997-05-24 14:38:05 +00:00
Bruce Momjian 656d88c611 Fix \c option after breaking it. 1997-05-24 01:45:17 +00:00
Bruce Momjian 449e575595 Only free memory if environment value is replaced. 1997-05-23 01:53:42 +00:00
Bruce Momjian 658f229ac6 Comment on fix added. 1997-05-23 00:20:20 +00:00
Bruce Momjian 148f7203fa Preserve putenv() memory in psql \connect user fix. 1997-05-22 23:57:27 +00:00
Bruce Momjian 65ff0feacf Fix backslash commands broken when \connect user added. 1997-05-22 18:55:40 +00:00
Bruce Momjian fce2c41b6c Updated pg_dumpall and psql to preserve database owners. 1997-05-21 03:12:23 +00:00
Bruce Momjian a1157deb57 Added fcvt() prot for bsdi.
Made PQsetdb() and PQfnumber() case-insensitive.
Removed attempt to set table ownership via pg_dumpall.
1997-05-20 03:39:02 +00:00
Thomas G. Lockhart 02233addcc Include information for reset, set, and show commands. 1997-05-17 06:16:34 +00:00
Bruce Momjian 2fc04874a6 Allow pg_dumpall to preserve database ownership. 1997-05-14 19:49:34 +00:00
Marc G. Fournier a5d7eb90a8 From: Keith Parks <emkxp01@mtcc.demon.co.uk>
Subject: [PATCHES] Three small patches.

Hi,

Here are 3 small patches to the postgreSQL source sup'd on
the 6th May 1997.

The 1st 2 fix the shell backslash "c" handling used to suppress
the newline on some unix shells. (The \c needs to be inside quote.)

The 3rd may or may not be the correct way to fix the missing
define of INDEX_MAX_KEYS in pg_dump.h
1997-05-07 02:59:59 +00:00
Vadim B. Mikheev a65dd5290e 1. Multi-column indices support.
2. Fix for function indices with more than 1 attrs.
1997-05-06 05:20:21 +00:00
Marc G. Fournier e52b943fdb Missed an -I directive 1997-04-26 06:13:31 +00:00
Marc G. Fournier c2ae467300 clean up the bin/*/Makefiles...up version.h to v6.1 instead of v6.0
Remove bin/Makefile.global since it wasn't actually *doing* anything
that Makefile.global hadn't already done
1997-04-26 05:07:12 +00:00
Marc G. Fournier 66d8e423b9 Set SRCDIR=.. 1997-04-24 14:30:09 +00:00
Vadim B. Mikheev 7a2b417d15 Vacuum help changed (ANALYZE). 1997-04-23 06:41:56 +00:00
Marc G. Fournier 1e9b80a2fd modifications to pg_dump towards supporting dumping of ACLs (doesn't work yet!)
modification to c.h so that bool isn't typedef'd under __cplusplus
1997-04-12 09:24:23 +00:00
Marc G. Fournier f986173e35 Add a \z command to psql that lists off grant/revoke permissions
- if someone can pick a better \? for this, plesae let me know...all
	  the good ones seem taken :(
1997-04-10 11:54:29 +00:00
Marc G. Fournier c7b40e6058 This commit represents a clean compile with the new templates under
FreeBSD

The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE.  The Makefile(s)
should be alot more straightforward then they were before...and
consistent
1997-04-04 10:43:16 +00:00
Vadim B. Mikheev 2b788e0bf5 \h create/drop sequence. 1997-04-02 04:18:26 +00:00
Vadim B. Mikheev b259e454e7 Dumping sequence relations as 'CREATE SEQUENCE ...'. 1997-04-02 04:17:27 +00:00
Vadim B. Mikheev 87bc5db412 '\h create index' shows that multi-column indices are available now. 1997-03-26 03:01:29 +00:00
Marc G. Fournier 3a7c93e7f3 From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] password authentication

This patch adds support for plaintext password authentication.  To use
it, you add a line like

host         all         0.0.0.0       0.0.0.0           password  pg_pwd.conf


to your pg_hba.conf, where 'pg_pwd.conf' is the name of a file containing
the usernames and password hashes in the format of the first two fields
of a Unix /etc/passwd file.  (Of course, you can use a specific database
name or IP instead.)

Then, to connect with a password through libpq, you use the PQconnectdb()
function, specifying the "password=" tag in the connect string and also
adding the tag "authtype=password".

I also added a command-line switch '-u' to psql that tells it to prompt
for a username and password and use password authentication.
1997-03-12 21:23:16 +00:00
Bruce Momjian 7e6aeb5074 Substitute defines for numeric constants in type ids.
Use INT4OID instead of 23.
1997-03-01 15:24:51 +00:00
Bruce Momjian 326d1568fd Remove old READMEs. 1997-02-28 11:58:04 +00:00
Marc G. Fournier ebdd6aa78b And, make sure that initdb.sh copies the pg_geqo.sample file to
${DATADIR}.  The file is left as pg_geqo.sample, since, unlike
pg_hba.conf, it isn't a required file...but this way ppl know that
its there, and that its where it is required, if they choose to
use it
1997-02-19 13:11:58 +00:00
Marc G. Fournier a5494a2d92 Various patches for nextstep by GregorHoffleit
Replaced NEED_STRDUP by !HAVE_STRDUP
1997-02-13 08:32:20 +00:00
Bruce Momjian ec4ca05c12 Fix \? syntax for copy command. 1997-02-11 03:11:33 +00:00
Marc G. Fournier ad6bfe67bd Various fixes suggested by Gregor Hoffleit
Add a check to configure for strdup
Remove all the '-ltermcap' checks from psql/Makefile
Have {psql,pg_dump}/Makefile modified if strdup doesn't exist on the system
1997-02-09 03:23:52 +00:00
Marc G. Fournier fd84cafb69 |I took a look at this and I think pg_dump mishandles arrays of ints and floats
|by neglecting to quote them.
|
|I have made a minor change to pg_dump.c that will fix this.
|
|Dates are dumped and restored OK with pg_dump in V6
|
|We'll still need to fix the dump in both cases if the original dump is from V1.09.

From Keith Parks
1997-02-09 03:00:09 +00:00
Bruce Momjian e9e86aa59d Include main Makefile.global first so variables are not over-written. 1997-02-06 02:31:52 +00:00
Marc G. Fournier 1d8a696fd5 Remove #include "rlstubs.h", since it doesn't exist anymore 1997-01-26 17:27:32 +00:00
Marc G. Fournier 917042f1c6 Remove rlstubs.[ch], since they weren't actually doing anything that couldn't
be #ifdef'd into psql.c itself

From what I can tell, if USE_READLINE is true or false, psql works under
FreeBSD, without configure.  Now to test it *again* under sparc_solaris
with configure and see if it works...
1997-01-25 23:54:08 +00:00
Marc G. Fournier aa46d53fa4 Okay, this should pretty much clean up the psql/readline/history mess.
Added a README.readline file until configure is integrated to *try* and
explain the way things stand.

Removed a stray configure .in file
1997-01-25 22:52:08 +00:00
Marc G. Fournier 374b2b0639 Why can't everyone be standard? :(
Add some code to make psql happy with a system where there is *no*
history code available, but there is readline code...
1997-01-25 22:16:43 +00:00
Marc G. Fournier d049cec4f5 Modifications to handle the situation where readline.h exists, but
history.h doesn't...previously, it was assumed that both existed, or
didn't exist...but this assumption fails on the one sparc_solaris box
that I have access to, and could exist in other circumstances
1997-01-25 21:58:08 +00:00
Marc G. Fournier f389e9dfc2 Change how readline support is included in psql.c ...
See message to hackers@ mailing list concerning this...
1997-01-25 03:51:59 +00:00
Marc G. Fournier cb31156b86 Have Makefile autoconf'd according to whether the system has
readline and associated libraries...
1997-01-24 02:35:27 +00:00
Bryan Henderson a4ee68d1d4 Add link options for libpq library search. 1997-01-21 05:16:38 +00:00
Bruce Momjian 604f4a6928 Update handling of backslashes, and pg_user dump. 1997-01-19 10:15:59 +00:00
Bruce Momjian 3827f4e7f0 Remove blank lines. 1997-01-18 03:26:08 +00:00
Bruce Momjian aa91f930a4 Removed unneeded custom shell script call. 1997-01-17 23:48:50 +00:00
Bruce Momjian 3d97a61a60 Added pg_dumpall to source tree. 1997-01-16 15:28:34 +00:00
Marc G. Fournier f413385f07 Comment out LD_ADD and DPADD 1997-01-15 05:58:47 +00:00
Bruce Momjian f56b4f1d59 Cleanup for DEBUG: removal in initdb.sh. 1997-01-14 03:07:15 +00:00
Bruce Momjian 6fafb4d370 Prevent initdb from showing vacuum statistics. 1997-01-14 03:02:06 +00:00
Bruce Momjian febfe447a7 Oops, introduced a bug in EOF handling. Fix it. 1997-01-13 02:35:32 +00:00
Bruce Momjian cac3463649 No EOF from psql when quiet mode. 1997-01-13 02:03:31 +00:00
Bruce Momjian ce02ccf43d I've noticed that \i filename in 6.0beta prints the input file double-spaced.
Here is a trivial patch to get back the 1.09 behavior; it just removes trailing
newlines before printing the line out with a newline rather than after...


Thomas Lockhart
1997-01-10 20:52:32 +00:00
Bruce Momjian 90ff767d14 I found the following bugs in the version 6.0 (dated 961229).
At least the first two should be fixed before the final release of 6.0.

1)      There is a mismatch between the type declared in the catalog for
        the input/output attributes of pg_type and the actual type of
        values stored in the table.  The type of typinput, typoutput,
        typsend and typreceive are declared oid (26) while the values are
        regproc (24).  The error was there also in previous versions but
        nobody noticed it until an Assert has been added in ExecEvalVar.
        The effect is that it is now impossible to replace the typoutput
        of existing data types with new procs.

2)      The identd hba fails after the first time because the data read
        from the identd socket is not zero-terminated and strlen reports
        an incorrect length if the stack contains garbage, which usually
        happens after the first connection has been made.

3)      The new initdb wants to create itself the data directory. This
        implies that the parent directory must be writable by postgres and
        this may not always be desirable.  A better solution would be to
        allow the directory to be created by root and then filled by initdb.
        It would also nice to have some reasonable default for PGLIB and
        PGDATA like the previous version did.  This applies also to the
        postmaster executable.
1997-01-10 17:40:07 +00:00
Marc G. Fournier 73b6ffbf76 Improvements to pg_dump to:
- dump Views

Submitted by: Keith Parks <emkxp01@mtcc.demon.co.uk>
1997-01-07 00:04:19 +00:00
Marc G. Fournier 046873ac90 REmove pg4_dump...its old stuff that is sooo out of date as to be useless... 1997-01-06 03:25:40 +00:00
Marc G. Fournier ea7a26c84b Fixes:
This corrects the newline handling when using the readline library.

Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>
1997-01-05 23:46:17 +00:00
Bruce Momjian 24632b0ee0 fix for previous fix 1997-01-02 07:07:32 +00:00
Bruce Momjian 6e2341a48e psql paren. with \r fix. 1997-01-02 06:45:25 +00:00
Bryan Henderson 9b94bcea21 Put $(CURSES_LIB) in Makefile.global to replace similar thing in psql/Makefile. 1996-12-30 23:19:48 +00:00
Bryan Henderson 7ab0ceb824 Check that PQendcopy succeeded. Issue error message if not. 1996-12-30 23:05:16 +00:00
Bruce Momjian 765dd2a4c0 explain change 1996-12-29 19:31:16 +00:00
Bruce Momjian 2d291ab093 Changed EXPLAIN option names. 1996-12-29 00:53:59 +00:00
Bruce Momjian bbc0d47773 Fixed error where = should be ==. 1996-12-28 22:44:58 +00:00
Bruce Momjian cb6cb7745d Here's the final set of patches to 6.0 (sup'd on 27/12/96) that allow a full
gmake of the code without interruption.

There's also some tidy-up of the MAXPATHLEN stuff based on the assumption that
all supported platforms have MAXPATHLEN defined in <sys/param.h>.

(The only unknowns for the above are AIX and IRIX5.)
1996-12-28 02:13:05 +00:00
Bryan Henderson 15526ff0ac Add messages to assist in problem diagnosis. Eliminate lines > 80 characters. 1996-12-27 23:12:57 +00:00
Bruce Momjian e8f43854ac pq/signal() portability patch. Also psql copy prompt fix. 1996-12-26 22:08:34 +00:00
Bryan Henderson 7f00f11c01 Fix syntax of \copy in \? display. 1996-12-26 20:56:40 +00:00
Bruce Momjian b1765f4637 Note the => changes to == after a connect and stays that way on subsequent
database changes.

To fix, apply the following patch:-

Keith Parks.
1996-12-26 17:52:46 +00:00
Bryan Henderson d9e10180ee Add some quotes so it works on more shells. 1996-12-23 08:50:27 +00:00
Vadim B. Mikheev cbb131570e if (settings->opt.fieldSep);
^ - deleted
                free(settings->opt.fieldSep);
1996-12-14 08:20:18 +00:00
Bruce Momjian 1b929d1749 Postgres95 to PostgreSQL. 1996-12-11 22:58:16 +00:00
Bryan Henderson 41b3674754 Add empty "dep:" target. 1996-12-10 03:40:23 +00:00
Bryan Henderson 9e60c1711d Monitor has been obsoleted by psql. 1996-12-09 01:55:51 +00:00
Bryan Henderson 9005a38bdb Change portname "sparc" to "sunos4" and change some portname dependencies to
feature dependencies.  Thanks Kurt J. Lidl.
1996-12-04 03:06:33 +00:00
Bruce Momjian 7980b8a5cc Fix for inclusion of new prompt output. 1996-12-01 20:28:39 +00:00
Bruce Momjian 440279e803 Add indicator for in quote or in query to prompt. 1996-11-30 03:41:20 +00:00
Bryan Henderson 7b4426eaea Throw some double quotes on the pile! 1996-11-29 06:24:14 +00:00
Bryan Henderson f0e7004d29 Make strdup work for Ultrix. Thanks Erik Bertelsen 1996-11-28 03:32:18 +00:00
Bruce Momjian 134c35c761 no change 1996-11-27 13:48:23 +00:00
Bryan Henderson 9c0afeabb7 More stuff to make it compile on various ports. 1996-11-27 08:16:44 +00:00
Bryan Henderson 8cfe27dff0 OK, I think I've got the postconfig thing right now. 1996-11-26 08:12:39 +00:00
Bryan Henderson 93f722536f Whoops, redo Ultrix patch so the other ports still compile. 1996-11-26 07:39:11 +00:00
Bryan Henderson 46d58fba33 Make it compile on Ultrix. Thanks Erik Bertelson. 1996-11-26 03:20:35 +00:00
Bryan Henderson f93f780269 -Werror fixes from D'Arcy. 1996-11-26 01:14:38 +00:00
Bryan Henderson 1d84088f50 Go back to $(postconfig...) from $(exec postconfig...) so it works on non-bash. 1996-11-25 05:51:50 +00:00
Bryan Henderson 092c7a6be5 Typecasts, etc. to make compile work on AIX. Thanks Darren King.. 1996-11-24 04:44:24 +00:00
Bryan Henderson 7e499bd112 Add dep: rule. 1996-11-24 03:55:19 +00:00
Bryan Henderson 45f1d32bf1 Eliminate pesky "postconfig not found" message. 1996-11-23 09:42:51 +00:00
Bruce Momjian eda3771290 Fix for \g strdup error. 1996-11-22 06:45:14 +00:00
Bryan Henderson 25fe3c7098 Include ctype.h to fix Kurt Lidl's compile problem. 1996-11-22 04:43:48 +00:00
Bryan Henderson 86ab9a5118 Fix bug: No -D option to postgres 1996-11-22 04:33:34 +00:00
Bruce Momjian 6399c74f17 Fix \g filename. Free allocated memory and don't use memory that has
been freed.
1996-11-20 22:34:36 +00:00
Bruce Momjian 9d45f22e38 Here is the patch for pg_dump not handling NULL values in 'insert'
mode properly.  This will apply correctly to 1.09 & 2.0 sources.
From David H. Bennett
1996-11-20 22:32:55 +00:00
Bruce Momjian ca1a20eba4 Fix for -da option of pg_dump. 1996-11-17 04:56:16 +00:00
Bryan Henderson 620f014621 Fix syntax errors so it runs without error messages. 1996-11-17 03:55:07 +00:00
Bruce Momjian 5dd3c5620c Added documentation on new unique index capability. 1996-11-16 05:45:56 +00:00
Bruce Momjian 0365c51e30 Overhaul MainLoop input processing for quotes, comments, backslashes. 1996-11-14 16:08:05 +00:00
Bryan Henderson f64b840387 Remove most compile-time options, add a few runtime options to make up for it.
In particular, no more compiled-in default for PGDATA or LIBDIR.  Commands
that need them need either invocation options or environment variables.
PGPORT default is hardcoded as 5432, but overrideable with options or
environment variables.
1996-11-14 10:25:54 +00:00
Bryan Henderson 65a10b1be6 Missed this part when I eliminated $(srcdir); src/bin stuff won't compile. 1996-11-14 09:24:39 +00:00
Bryan Henderson b20766ccc4 Eliminate MKDIR, srcdir, objdir. Centralize setting of LIBPQDIR. 1996-11-13 10:36:36 +00:00
Bryan Henderson 17befd6c69 Use new utils/version.c instead of backend/utils/init/magic.c. 1996-11-12 06:47:10 +00:00
Bryan Henderson bbe89089c8 Add dependency for install. 1996-11-12 06:11:52 +00:00
Bryan Henderson f45b50cfe0 Add install dependency. 1996-11-12 06:10:10 +00:00
Bryan Henderson 4f1e59f72b Fix bug where it tries to do a cleardbdir when you make install. 1996-11-12 02:54:30 +00:00
Marc G. Fournier 64f80c76d8 fix 'conflicting types' errors 1996-11-11 14:55:49 +00:00
Bryan Henderson 6f708e42d1 Makefile simplification: the "bin" chapter 1996-11-11 13:41:36 +00:00
Marc G. Fournier 2bdded3540 Various cleanups from D'Arcy 1996-11-11 12:14:45 +00:00
Bruce Momjian 42a344683a Remove warnings when readline is not used. 1996-11-11 05:55:33 +00:00
Bruce Momjian aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Bryan Henderson 4e70c05979 Add #include <unistd.h> to quiet warning about missing getopt() declaration. 1996-11-10 01:35:39 +00:00
Bruce Momjian a0990e1884 Makefile cleanup after reorganization 1996-11-09 06:24:51 +00:00
Bruce Momjian c9c0e111b8 More compile cleanups 1996-11-08 20:46:33 +00:00
Bruce Momjian 4b2b8592a0 Compile and warning cleanup 1996-11-08 06:02:30 +00:00
Bryan Henderson 7870c5a0d3 Add frontend \copy command. 1996-11-04 09:17:55 +00:00
Bruce Momjian 5061c23ac2 Rename CDEBUG to COPT 1996-11-04 05:15:07 +00:00
Bruce Momjian 7e42f4814d Removed PORTNAME_. Use OS version only. 1996-11-04 04:00:56 +00:00
Bryan Henderson 31e8156fad Continuation of make file simplification; handle libpq.a dependancy. 1996-11-02 09:53:15 +00:00
Bruce Momjian 3a4c2888a1 Removal of bsdi_2_1 port. 1996-11-01 01:47:23 +00:00
Bruce Momjian 3d7fe6c97c Added needed include file. 1996-10-31 05:58:01 +00:00
Bruce Momjian 1a865b8338 Change display of char(5) to (bp)char 5 so psql \d can
distinguish between char and char(1).
1996-10-14 00:33:47 +00:00
Bruce Momjian 86be8677a9 Added consistent include file handling for MAXHOSTNAMELEN.
If I have introduced any syntax errors with this, I will patch them in
the morning, and Marc will have a good laugh.
1996-10-13 04:50:27 +00:00
Bryan Henderson 369848857e New host-based authentication -- set up pg_hba.conf instead of pg_hba 1996-10-12 07:49:56 +00:00
Bruce Momjian 9b1e61b7e9 Changed psql \h command to print commands in three columns.
No more scrolling off the screen.
1996-10-09 00:15:44 +00:00
Marc G. Fournier ea733aa997 Fix a couple of small things from D'Arcy's last patch
Submitted by: D'Arcy Cain
1996-10-07 21:17:01 +00:00
Marc G. Fournier de466eb8f4 Mostly adding "const" keyword and making some functions static.
Submitted by: D'Arcy Cain
1996-10-07 03:30:40 +00:00
Bruce Momjian 3a56b21832 Update help for alter table. remove EXTEND function. 1996-10-07 02:32:39 +00:00
Bruce Momjian e8e78f4c7b Fix typo in help text. 1996-10-05 21:34:33 +00:00
Bruce Momjian a974522f5f Added single-letter options and case statement. 1996-10-05 03:24:47 +00:00
Marc G. Fournier 002be14c45 And bring in change from 1.0.7 tree to here... 1996-10-04 20:29:35 +00:00
Marc G. Fournier 27bccb9db3 This patch fixes problems in initdb, including that it doesn't run
with some versions of sh, and a bug in the master make file that
causes it to issue the message "postgres has been built" at the wrong
time.

Submitted by: bryanh@giraffe.netgate.net (Bryan Henderson)
1996-10-04 20:07:10 +00:00
Bruce Momjian 4bec96f16f Brought psql help up to date with syntax and manual. 1996-10-03 15:46:31 +00:00
Bruce Momjian 75e2cbcec3 New vacuum option. 1996-10-03 04:20:41 +00:00
Bruce Momjian fedb734df9 Fixes extra space in printing. 1996-10-03 04:20:11 +00:00
Bruce Momjian a14bf40b88 Added new single-letter options to initdb.sh.
Removed long-option names that used ${#} shell feature which
was a compatability problem.
1996-10-03 00:23:42 +00:00
Marc G. Fournier 67e8736348 change stdout to fout
Submitted by: Carsten Heyl <heyl@nads.de>
1996-10-02 21:38:35 +00:00
Marc G. Fournier 87799e38f1 Prototype setMaxOid()
Submitted by: Bruce
1996-09-23 18:15:41 +00:00
Marc G. Fournier ff4d0d435e Here's a patch that I discussed recently on pg95-dev that changes the
way one creates a database system.  Parts that were in "make install"
are not either in "make all" or initdb.  Nothing goes in the PGDATA
directory besides user data.  Creating multiple database systems is
easier.

In addition to applying the patch, it is necessary to move the file
libpq/pg_hba to backend/libpq/pg_hba.sample.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-09-23 08:24:13 +00:00
Marc G. Fournier 04b55fc4a4 Patches to make POSTPORT changes in scripts
Originally submitted by: ernst.molitor@uni-bonn.de
resubmitted by: D'Arcy Cain
1996-09-21 06:24:41 +00:00
Marc G. Fournier efebd7b7aa Cleanup patch of pg_version
Submitted by:  darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-19 19:58:27 +00:00
Marc G. Fournier 0318f227ac Add missing includes to silence compile
Submitted by: D'Arcy Cain
1996-09-16 06:34:40 +00:00
Marc G. Fournier f589ca6800 The following diffs remove the various definitions of dupstr() and replace
all the calls with strdup.

Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
1996-09-16 06:06:17 +00:00
Marc G. Fournier 28fad34c7b modifications required to reflect centralized include files 1996-08-28 23:02:43 +00:00
Marc G. Fournier c449668d3e Fix prototype for dumpClasses 1996-08-26 05:46:39 +00:00
Marc G. Fournier 208a30f23d The patch does several things:
It adds a WITH OIDS option to the copy command, which allows
dumping and loading of oids.

        If a copy command tried to load in an oid that is greater than
its current system max oid, the system max oid is incremented.  No
checking is done to see if other backends are running and have cached
oids.

        pg_dump as its first step when using the -o (oid) option, will
copy in a dummy row to set the system max oid value so as rows are
loaded in, they are certain to be lower than the system oid.

        pg_dump now creates indexes at the end to speed loading


Submitted by:  Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-24 20:49:41 +00:00
Marc G. Fournier 2a23229cb3 BSD$$_derived needs -ltermcap for psql 1996-08-21 04:06:01 +00:00
Julian Assange 99dc4e3b43 command line flag for expanded display '-x' had logic reversed 1996-08-21 00:22:41 +00:00
Marc G. Fournier 1bdbf4092a Bring in changes to READLINE/HISTORY defines 1996-08-20 05:04:13 +00:00
Marc G. Fournier 476ef10913 This patch can be installed as part of 1.02.1 so people can properly
pg_dump and load to 2.0.  I haven't gotten any feedback on whether
people want it, so I am submitting it for others to decide.  I would
recommend an install in 1.02.1.

I had said that the 2.0 pg_dump could dump a 1.02.1 database, but I was
wrong.  The copy is actually performed by the backend, and the 2.0
database will not be able to read 1.02.1 databases because of the new
system columns.

This patch does several things.  It copies nulls out as \N, so they can
be distinguished from '' strings.  It fixes a problem where backslashes
in the input stream were not output as double-backslashes.  Without this
patch, backslashes copied out were deleted upon input, or interpreted as
special characters.  Third, input is now terminated by backslash-period.
This can not be part of a normal input stream.

I tested this by creating a database with all sorts of nulls, backslash,
and period fields and dumped the database and reloaded into a new
database and compared them.

Submitted by: Bruce
1996-08-14 05:44:25 +00:00
Marc G. Fournier e7a110b418 This patch can be installed as part of 1.02.1 so people can properly
pg_dump and load to 2.0.  I haven't gotten any feedback on whether
people want it, so I am submitting it for others to decide.  I would
recommend an install in 1.02.1.

I had said that the 2.0 pg_dump could dump a 1.02.1 database, but I was
wrong.  The copy is actually performed by the backend, and the 2.0
database will not be able to read 1.02.1 databases because of the new
system columns.

This patch does several things.  It copies nulls out as \N, so they can
be distinguished from '' strings.  It fixes a problem where backslashes
in the input stream were not output as double-backslashes.  Without this
patch, backslashes copied out were deleted upon input, or interpreted as
special characters.  Third, input is now terminated by backslash-period.
This can not be part of a normal input stream.

I tested this by creating a database with all sorts of nulls, backslash,
and period fields and dumped the database and reloaded into a new
database and compared them.

Submitted by: Bruce
1996-08-14 05:33:11 +00:00
Marc G. Fournier 011ee13131 |
|We're all too familiar with psql's "no response from backend" message.
|Users can't tell what this means, and psql continues prompting for
|commands after it even though the backend is dead and no commands can
|succeed.  It eventually dies on a signal when the dead socket fills
|up.  I extended the message to offer a better explanation and made
|psql exit when it finds the backend is dead.
|
|I also added a short message and newline when the user does a ctl-D so
|it doesn't mess up the terminal display.
|
|

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:56:55 +00:00
Marc G. Fournier 6b9ecd8348 Here's a small makefile patch that corrects the following bug: The makefiles
don't indicate that the libpq.a library is a dependency of all the /bin
programs.  So if the library changes, the /bin programs don't get remade.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-14 04:54:45 +00:00
Marc G. Fournier ca5db6cab1 I have attached a minor update for the Postgres make files. This update
does 2 things:

1) Make it hard to not notice the make failed.  (As you recall, someone on
   the mailing list had this problem.  I've had it to some extent myself).

    The 1.02 make files continue with the next subdirectory when a make
    in a subdirectory fails.  The patch makes the make stop in the
    conventional way when a submake fails.  It also adds a reassuring message
    when the make succeeds and adds a note to the INSTALL file to expect it.

2) Include loader flags on all invocations of the linker.

   The 1.02 make files omit the $(LDFLAGS) on some of the linker invocations.
   On my system, I need one of those flags just to make it invoke the proper
   version of the compiler/linker, so LDFLAGS has to be everywhere.

Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
1996-08-13 07:48:33 +00:00
Marc G. Fournier 1508feb283 Another small patch fix...
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-10 05:02:53 +00:00
Julian Assange dfca092633 applied kurt's patch to fix unlikely, but potential, string underflow
problem in psql
1996-08-06 20:23:14 +00:00
Julian Assange 7ef04b25cc added patch from kurt that fixes memory leak (didn't free line buffer
for slash commands)
1996-08-06 00:40:12 +00:00
Marc G. Fournier cb34902cbd Move port includes from bin/pg_dump/Makefile to Makefile.global 1996-07-31 18:59:00 +00:00
Marc G. Fournier 7d2000e3a7 Fix for <machine.h> bug
Submitted by: Bruce
1996-07-31 17:35:13 +00:00
Marc G. Fournier c114bf330d A "lost in the archives" patch from Chris Dunlop <chris@atlas.onthe.net.au> 1996-07-31 06:09:46 +00:00
Marc G. Fournier a05ed5bc11 Fixes:
In postgres95/src/backend/nodes/readfuncs, lines 1188 and 1189,
local_node->relname is taken to point to a NameType, while its
defined as a pointer to char. Both the casting to Name and the
call of namestrcpy should, IMHO, be changed appropriately (first
patch).

As far as I could see from the Linux signal header file,
a signal handler is declared as

        typedef void (*__sighandler_t)(int);

Few changes to postgres95/src/backend/storage/lmgr/proc.c seem
appropriate to comply with this.

Finally, postgres95/src/bin/pg_version/pg_version.c defines
a function GetDataHome (by default, returning an integer)
and returns NULL in the function, which isn't an integer...

Submitted by:  ernst.molitor@uni-bonn.de
1996-07-31 02:19:23 +00:00
Marc G. Fournier 4477b6f6c2 Fixes:
updates the psql.1 manual page for \ options
        add row count and ties it to the header option
        updated manual pages and comment for above change
        got \? to display in one screen-full (almost, \? scrolls off top)
        moved \r to \E, and \z to \r (for historical reasons with monitor)
        small code alignment cleanup

Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-31 02:11:23 +00:00
Marc G. Fournier e5e12f6405 More cleanups by "Kurt J. Lidl" <lidl@va.pubnix.com> 1996-07-30 07:47:58 +00:00
Marc G. Fournier be19feb14a The decode function in psql.c doesn't return anything, so its
declaration is incorrect.

-Kurt
1996-07-29 20:58:42 +00:00
Marc G. Fournier 7450ea6dfb cosmetic changes: char* x changed to char *x
submitted by: bruce
1996-07-28 07:08:15 +00:00
Marc G. Fournier 0e887c541e reversed bruces patch to getopt() loop about optarg
submitted by: bruce
1996-07-28 06:59:43 +00:00
Julian Assange ed3240d093 bugfix: if NOREADLINE was not defined and input was not from a tty, then
the getopt() was not executed.
1996-07-28 06:48:42 +00:00
Marc G. Fournier 64b130a8e7 Various fixes required for psql
Submitted by: Bruce
1996-07-27 04:38:22 +00:00
Marc G. Fournier edb519b14c and now, the long awaited PAGER patches from Bruce...
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-27 02:55:23 +00:00
Marc G. Fournier 6e077b0ae5 Further modifications for fixing createuser bug...
Submitted by: Rick Weldon <rick@wisetech.com>
1996-07-27 02:40:45 +00:00
Marc G. Fournier 22113f81fd This is a patch to pg_dump which fixes varchar and char printing in the
case where the attribute length is variable (stored as -1).  Previously,
you'd get output that looked like:

CREATE TABLE foo (bar varchar(-1));

Monitor and psql don't like this at all :).  Here is a fix:


Submitted by: Adam Sussman <myddryn@vidya.com>
1996-07-27 02:29:51 +00:00
Marc G. Fournier 1a675fe5b2 Fixed these script sonce and for all?
Submitted by: Rick Weldon <rick@wisetech.com>
1996-07-27 02:19:18 +00:00
Marc G. Fournier aac483943d fixed usuage of -ltermcap for psql
submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-07-25 20:01:51 +00:00
Marc G. Fournier ff50e5ab47 Switched from using monitor to using psql
Submitted by: Rick Weldon <rick@wisetech.com>
1996-07-25 06:55:49 +00:00
Marc G. Fournier 69ee15d663 Removed monitor from compile/install (will eventually be removed
completely)
1996-07-25 06:54:26 +00:00
Julian Assange 76bc8cb97f Large re-write/enhancement. In pg-101 Jolly only included a smaller part
of my (proff) patch. This is the rest of it, with a few, mainly aesthetic
changes. I've removed a lot of redundency from the original code,
added support for the new PQprint() routines in libpq, expanded tables,
and a few generally nifty ways of massaging data in and out of the
backend. Still needs some good stress testing.
1996-07-25 06:46:35 +00:00
Marc G. Fournier 98ae3fadd1 Ack, -I$(srcdir)/backend *is* required... 1996-07-25 01:11:15 +00:00
Marc G. Fournier 2f19e28940 there are no includes files in backend, there should be, so why look
there?
1996-07-25 00:26:21 +00:00
Marc G. Fournier 0864a2ddae Fix compiler not finding libpgtcl.h header file 1996-07-25 00:22:19 +00:00
Marc G. Fournier be5bfd54f2 Put in a new FAQ
Merged in Dr. George's src/bin tree (possibly broke monitor/psql in process)
1996-07-23 03:03:43 +00:00
Marc G. Fournier d1724d65b7 reversed julian's patch back in again...othere things cause monitor
to not compile now...
1996-07-23 02:26:41 +00:00
Marc G. Fournier 672f6ece23 Brought in David Bennett's (dave@bensoft.com) changes to pg_dump 1996-07-22 08:37:00 +00:00
Marc G. Fournier 02bbd95a41 Backed out the changes to monitor.c that seem to be affecting the
ability for createuser to actually create one...
1996-07-22 05:59:53 +00:00
Marc G. Fournier 435d32cd25 quick fix to src/bin/Makefile.global so that compiling doesn't look for a
libpq that is already installed...

submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-22 04:51:05 +00:00
Marc G. Fournier df43edcf45 Fix for:
>
> We did some testing and found that if we name the table 'Inv' with
> anything appended to it, the table does not appear in the '\d' table list.
> It appears to be the capital I as a table named 'invItemsL' is created
> and displayed properly.
>


- submitted by: Jason Wright <jason@shiloh.vnet.net>
1996-07-20 08:44:45 +00:00
Marc G. Fournier 5feb9dc9df - extend conditional for use of -ltermcap in bsdi/bsdi_2_1 compiles
- submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-20 07:40:03 +00:00
Marc G. Fournier c777e8131e fixed a bug with not commenting out FSYNC= in initdb.sh 1996-07-20 07:33:36 +00:00
Marc G. Fournier df1a06ed37 - added -ltermcap to LIBS in bin/psql/Makefile
- submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-19 06:53:40 +00:00
Marc G. Fournier 2ab6d1f125 Removed -I${HEADERFILE} from bin/Makefile.global 1996-07-19 06:47:51 +00:00
Marc G. Fournier 2771129c82 Fixes:
minor Makefile changes to force setting of SRCDIR and ordering of
	include files

Submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-19 05:32:42 +00:00
Marc G. Fournier 72f76d38eb libpq and psql.c have been modified to do various things they didn't do
before (plus some optimisations/bug fixes et al).  I've included a small
demo transcript below. Note that all of of the display
functionality/intelligence you see here, can be had merely by calling
the new LIBPQ PQprint() routine with the appropriate arguments/options,
including the HTML3 output guff.


submitted by:  Julian Assange <proff@suburbia.net>
1996-07-18 05:48:57 +00:00
Marc G. Fournier bf2abf0dae fix: clean up formatting of \d tablename in psql
submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 06:58:12 +00:00
Marc G. Fournier 169a5b7670 applied fixes for psql
- \p produces traditional results
	- \r added

submitted by: Bruce Momjian (root@candle.pha.pa.us)
1996-07-16 06:37:28 +00:00
Marc G. Fournier 350cb69aed fsync patch from openlink
NOTE: FSYNC needs to be set at top of initdb.sh to enable use of fsync
	patches...disabled by default
1996-07-15 19:22:58 +00:00
Marc G. Fournier d602a35d37 Brought in extensions to pg_dump
Submitted by: david bennett <dave@bensoft.com>
	      marc g. fournier <scrappy@ki.net>
1996-07-12 05:39:39 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00