Commit Graph

7153 Commits

Author SHA1 Message Date
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