Commit Graph

7047 Commits

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