Update source code to Byron's v6.30.0250 sources plus minor cleanup
to get rid of unused variables.
Get clean compile on Linux (Thomas and Gerald).
Implement autoconf/configure for standalone builds and use the existing
autoconf/configure system when in the Postgres source tree.
Code tests and functions with ApplixWare-4.4.1beta on a Linux box.
Changes should be backward compatible with WIN32 but still needs testing.
Bruce Momjian [Tue, 6 Oct 1998 03:12:59 +0000 (03:12 +0000)]
> > There is a bug in check_foreign_key of refint.c which is bundled with
> > the standard distribution. It occurs when a trigger calling this
> > function recursively fires another trigger which calls the same
> > function. The calling check_foreign_key loses its plan informantion and
> > when it tries to use it the backend closes its channel. You can check it
> > with the sql script I am attaching below.
> > The solution to this is to do a find_plan again before executing it at
> > line 483 of refint.c.
> > Therefore two more lines should be added before line 483:
Bruce Momjian [Tue, 6 Oct 1998 03:02:29 +0000 (03:02 +0000)]
Here are the patches against the current source tree. I have run the
regression test on a FreeBSD box with both non-MULTIBYTE and
MULTIBYTE-enabled, and confirmed that the results are same.
However I do not tested on PCs(I don't have access to win). Please let
me know if the patches break anything on PCs.
Also please note that the patch for varchar.c is a fix for a nasty bug
of char(n) types that I introduced and I believe at least this should
be applied.
Tom Lane [Tue, 6 Oct 1998 02:40:09 +0000 (02:40 +0000)]
Substantial rewrite of async.c to avoid problems with non-reentrant stdio
and possibly other problems. Minor changes in xact.c and postgres.c's
main loop to support new handling of async NOTIFY.
Tom Lane [Tue, 6 Oct 1998 02:31:42 +0000 (02:31 +0000)]
Add configure test to make sure fcntl(SETLK) is available,
and make backend/libpq/pqcomm.c only try to lock the socket file when
the call exists. Also, change open-RDONLY to open-WRONLY; at least
on my platform, you can't get a write lock on a file you didn't open
for writing.
Add new information for utility commands.
Haven't yet done cleardbdir, ipcclean, pg_passwd, and pg_upgrade.
Add reference info for the SQL VACUUM command (oops, forgot it earlier).
Tom Lane [Sun, 4 Oct 1998 20:19:08 +0000 (20:19 +0000)]
hash.h's use of BSHIFT conflicts with <sys/param.h> on my
system. Finally got tired of looking at the compiler warning messages.
BSHIFT isn't all that useful, so I just took out the macro.
Changes from Michael Meskes:
Check strdup calls for out of memory.
Set library version to 2.6.2
Synced preproc.y and keywords.c with gram.y and keywords.c yet again.
Set version to 2.4.3
Bruce Momjian [Fri, 2 Oct 1998 21:53:39 +0000 (21:53 +0000)]
Please apply the patch at the end. Disables use of system
columns of views at all (not only oid, cmin etc. too).
pgsql=> select cmin from pg_rules;
ERROR: system column cmin not available - pg_rules is a view
pgsql=> select * from pg_rules where pg_rules.oid = pg_class.oid;
ERROR: system column oid not available - pg_rules is a view
pgsql=>
Obsolete information completely superceded by the sgml sources.
These weren't really "man page"-ish anyway, and I've verified that
all information in them has moved to the newer sources.
Surround all identifiers with double quotes.
Formerly did so only for those which clearly required it, but that
would still miss things like reserved key words which also require it.
Implement the "-n" switch to revert the double quote behavior
to put DQs only where there is more than lower-case, digits,
and underscores.
Bruce Momjian [Fri, 2 Oct 1998 16:28:04 +0000 (16:28 +0000)]
Here's a combination of all the patches I'm currently waiting
for against a just updated CVS tree. It contains
Partial new rewrite system that handles subselects, view
aggregate columns, insert into select from view, updates
with set col = view-value and select rules restriction to
view definition.
Updates for rule/view backparsing utility functions to
handle subselects correct.
New system views pg_tables and pg_indexes (where you can
see the complete index definition in the latter one).
Enabling array references on query parameters.
Bugfix for functional index.
Little changes to system views pg_rules and pg_views.
The rule system isn't a release-stopper any longer.
But another stopper is that I don't know if the latest
changes to PL/pgSQL (not already in CVS) made it compile on
AIX. Still wait for some response from Dave.
Bruce Momjian [Fri, 2 Oct 1998 15:23:08 +0000 (15:23 +0000)]
Here's the new diff for getting the NS32K assembly code into the
spin-locks. Notice that it's now inline assembler in s_lock.h,
rather than seperate code in s_lock.c. It also shrank a little
bit... Just rip out the S_LOCK() define and insert the tas() inline
function. Please let me know if there are any problems with it.
Tom Lane [Fri, 2 Oct 1998 01:37:17 +0000 (01:37 +0000)]
Fix potential coredump in pg_conndefaults (assigning constant string
to a field that will get free'd). Also make it robust in cases where
values contain Tcl special characters.
Tom Lane [Fri, 2 Oct 1998 01:14:14 +0000 (01:14 +0000)]
Clean up some minor bugs concerning what was inside the main loop
and what wasn't. Also try to improve the comments so that doesn't happen
again. Changed SIGPIPE handling to SIG_IGN so that if frontend quits,
we will finish out the current command and return to main loop before
quitting. This seems much safer than a forced abort mid-command.
Tom Lane [Thu, 1 Oct 1998 02:04:01 +0000 (02:04 +0000)]
Get rid of some long-dead code that thinks NOTIFY is passed to the
planner/optimizer/executor. It isn't.
Besides, most of the removed code consists of comments about how
it's not right.
Tom Lane [Thu, 1 Oct 1998 01:53:50 +0000 (01:53 +0000)]
Make HP-PA S_UNLOCK a little faster and less dependent on unspecified compiler codegen details.
Make default S_LOCK macro more robust against syntax mistakes.
(I cleared these changes with David Gould a few days ago.)
Add as many keywords as possible to column identifier or label lists.
Add "timestamp" to list of tokens in keywords.c.
Before, TIMESTAMP WITH TIME ZONE did not actually parser.
Reorder token lists to be more alphabetical.
Remove ARCHIVE keyword which was deprecated in v6.3.
Clean up pages. Add information for operator precedence.
Split introduction sections into separate files to allow the legal notice
and notation sections appear in all documents without having the history
show up everplace too.
Add full list of reserved and non-reserved key words in syntax.sgml.
Add a separate chapter to the admin guide on security.
Marc G. Fournier [Tue, 29 Sep 1998 12:43:05 +0000 (12:43 +0000)]
From: Jan Wieck <jwieck@debis.com>
here is the patch that includes PL/pgSQL into the build
(currently with make errors ignored) and adds a regression
test for it. A clean build and regression ran fine here.
Can you please apply it?
The tar should be extracted in /usr/local/src/pgsql and
creates the following files:
src/pl/Makefile
called by toplevel GNUmakefile and for now only calls
src/pl/plpgsql/Makefile
src/pl/plpgsql/Makefile
calls src/pl/plpgsql/src/Makefile (here the call to
make ignores build errors - this must be changed
later for the final release).
src/test/regress/input/install_plpgsql.source
SQL script installing PL/pgSQL language in regression
database. Will be modified by .../input/Makefile to
point to correct PGLIB directory where plpgsql.so
gets installed.
src/test/regress/output/install_plpgsql.source
expected output for installation script.
src/test/regress/sql/plpgsql.sql
the main regression test. It tests functions and
triggers written in PL/pgSQL including views that use
supportfunctions in this language.
src/test/regress/expected/plpgsql.out
the expected output for the above regression test.
Bruce Momjian [Tue, 22 Sep 1998 16:52:59 +0000 (16:52 +0000)]
Here are some patches to fix up the regression tests so that the union
test passes. Interestingly, the fix involves no changes or special
cases in the union test and actually removes a special case for the
numerology test. Thus, following the strategy outlined below is a
definite improvement over the previous situation.
Marc G. Fournier [Mon, 21 Sep 1998 05:52:55 +0000 (05:52 +0000)]
From: Michael Meskes <meskes@usa.net>
+ Mon Aug 31 09:40:04 CEST 1998
+
+ - Minor patch to Makefile
+ - Put pgc.l in sync with scan.l
+
+ Tue Sep 1 11:31:05 CEST 1998
+
+ - Fixed another bug in preproc.y
+
+ Thu Sep 3 12:21:16 CEST 1998
+
+ - Sync preproc.y with gram.y
+
+ Mon Sep 14 09:21:02 CEST 1998
+
+ - Sync preproc.y with gram.y yet again
+
+ Thu Sep 17 08:55:33 CEST 1998
+
+ - Synced preproc.y and gram.y one more time
+
+ Thu Sep 17 19:23:24 CEST 1998
+
+ - Added missing ´;´ in preproc.y
+ - Set version to 2.4.2
Bruce Momjian [Mon, 21 Sep 1998 01:02:04 +0000 (01:02 +0000)]
This patch covers several to-do items that I had for libpgtcl:
* It works under both Tcl 7.6 and Tcl 8.0 now. (The code claims to
work under Tcl 7.5 as well, but I have no way to test that ---
if anyone still cares, please check it with 7.5.)
* pg_listen suppresses extra LISTEN commands and correctly sends an
UNLISTEN when the last listen request for a relation is cancelled.
(Note this means it will not work with pre-6.4 backends, but that
was true already because it depends on the current libpq, which
only speaks protocol 2.0.)
* Added -error option to pg_result so that there's some way to find
out what you did wrong ;-)
* Miscellaneous cleanups of code comments and overenthusiastic #includes.
BTW, I bumped the package version number from 1.2 to 1.3. Is this
premature? Does someone run around and do that routinely before
each pgsql release?
Bruce Momjian [Sun, 20 Sep 1998 03:18:43 +0000 (03:18 +0000)]
I also noticed that pg_dump contains a copy of the same
prompt_for_password code that psql does. We fixed psql a month or
two back to permit usernames and passwords longer than 8 characters.
I propagated the same fix into pg_dump.
Consolidate Jan's rules test into one file.
Remove dependency on a specific Postgres user name in the results
(Check result against CURRENT_USER with a boolean instead).
Support specifying PRIMARY KEY for the SERIAL type.
Change DEFAULT NULL to send back a NULL pointer
rather than a string "NULL". This seems to work, where sending
the string led to type conversion problems (and probably the wrong
thing anyway).