Bruce Momjian [Tue, 5 Mar 2002 02:01:44 +0000 (02:01 +0000)]
Back out python patch:
Elliot Lee wrote:
> This patch to the python bindings adds C versions of the often-used
query
> args quoting routines, as well as support for quoting lists e.g.
> dbc.execute("SELECT * FROM foo WHERE blah IN %s", ([1,2,3],))
Bruce Momjian [Tue, 5 Mar 2002 00:23:13 +0000 (00:23 +0000)]
This patch to the python bindings adds C versions of the often-used
query args quoting routines, as well as support for quoting lists e.g.
dbc.execute("SELECT * FROM foo WHERE blah IN %s", ([1,2,3],))
Tom Lane [Mon, 4 Mar 2002 05:17:55 +0000 (05:17 +0000)]
Fix very ancient breakage in alter-table tests: apparently, there was a
type named 'dt' back in Postgres 4.2, and the regression test wasn't
updated when it was removed. Per report from Patricia Holben of Great
Bridge.
Tom Lane [Mon, 4 Mar 2002 04:45:27 +0000 (04:45 +0000)]
If presented db path has a trailing slash, remove it to avoid generating
double slashes in generated filenames. This is not strictly necessary
on standard Unixen, but I'm being a neatnik...
Tatsuo Ishii [Mon, 4 Mar 2002 03:55:50 +0000 (03:55 +0000)]
Fix bug in extract/date_part for milliseconds/miscroseconds and
timestamp/timestamptz combo. Now extract/date_part returns
seconds*1000 or 1000000 + fraction part as the manual stats.
regression test are also fixed.
Tom Lane [Mon, 4 Mar 2002 01:46:04 +0000 (01:46 +0000)]
Further work on elog cleanup: fix some bogosities in elog's logic about
when to send what to which, prevent recursion by introducing new COMMERROR
elog level for client-communication problems, get rid of direct writes
to stderr in backend/libpq files, prevent non-error elogs from going to
client during the authentication cycle.
Tom Lane [Sun, 3 Mar 2002 17:47:56 +0000 (17:47 +0000)]
Catcaches can now store negative entries as well as positive ones, to
speed up repetitive failed searches; per pghackers discussion in late
January. inval.c logic substantially simplified, since we can now treat
inserts and deletes alike as far as inval events are concerned. Some
repair work needed in heap_create_with_catalog, which turns out to have
been doing CommandCounterIncrement at a point where the new relation has
non-self-consistent catalog entries. With the new inval code, that
resulted in assert failures during a relcache entry rebuild.
Bruce Momjian [Sat, 2 Mar 2002 21:39:36 +0000 (21:39 +0000)]
Commit to match discussed elog() changes. Only update is that LOG is
now just below FATAL in server_min_messages. Added more text to
highlight ordering difference between it and client_min_messages.
REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
Tom Lane [Sat, 2 Mar 2002 20:46:12 +0000 (20:46 +0000)]
Add code to allow profiling of backends on Linux: save and restore the
profiling timer setting across fork(). The correct way to build a
profilable backend on Linux is now gmake PROFILE="-pg -DLINUX_PROFILE"
Tom Lane [Sat, 2 Mar 2002 00:49:22 +0000 (00:49 +0000)]
Don't bother to request SSL connection over a Unix socket, since the
postmaster won't accept the request anyway. (If your kernel can't
be trusted, SSL will not help you.)
Tom Lane [Sat, 2 Mar 2002 00:34:24 +0000 (00:34 +0000)]
Array slice extraction should produce a result array with index lower
bounds of 1, not the lower bound subscripts of the original slice.
Per bug report from Andre Holzner, 1-Feb-02.
Tom Lane [Fri, 1 Mar 2002 04:09:28 +0000 (04:09 +0000)]
Teach planner about the idea that a mergejoin won't necessarily read
both input streams to the end. If one variable's range is much less
than the other, an indexscan-based merge can win by not scanning all
of the other table. Per example from Reinhard Max.
Tom Lane [Wed, 27 Feb 2002 23:16:07 +0000 (23:16 +0000)]
Tweak pg_exec_query_string so that we close down transaction command
before reporting command-complete message for the final command of a
query string. This way, any errors detected during finish_xact_command
(such as RI violations) will appear to be part of the final command,
rather than coming out after the command is reported complete. This
avoids confusing PQendcopy and other not-overly-bright clients.
Per Lee Harr's bug report of 25-Feb-02.
Tom Lane [Wed, 27 Feb 2002 20:59:05 +0000 (20:59 +0000)]
#ifdef out pg_dump's check on whether a sequence's sequence_name field
matches the sequence name from pg_class. This fails if the sequence has
been renamed, and seems rather pointless in any case.
Also improve a couple of error messages about inconsistencies.
Tom Lane [Wed, 27 Feb 2002 19:36:13 +0000 (19:36 +0000)]
Clean up BeginCommand and related routines. BeginCommand and EndCommand
are now both invoked once per received SQL command (raw parsetree) from
pg_exec_query_string. BeginCommand is actually just an empty routine
at the moment --- all its former operations have been pushed into tuple
receiver setup routines in printtup.c. This makes for a clean distinction
between BeginCommand/EndCommand (once per command) and the tuple receiver
setup/teardown routines (once per ExecutorRun call), whereas the old code
was quite ad hoc. Along the way, clean up the calling conventions for
ExecutorRun a little bit.
Tatsuo Ishii [Wed, 27 Feb 2002 01:34:41 +0000 (01:34 +0000)]
Fix bug in COPY FROM when DELIMITER is not in ASCII range.
See pgsql-bugs/pgsql-hackers discussion "COPY FROM is not 8bit clean"
around 2002/02/26 for more details -- Tatsuo Ishii
Tom Lane [Tue, 26 Feb 2002 22:47:12 +0000 (22:47 +0000)]
Restructure command-completion-report code so that there is just one
report for each received SQL command, regardless of rewriting activity.
Also ensure that this report comes from the 'original' command, not the
last command generated by rewrite; this fixes 7.2 breakage for INSERT
commands that have actions added by rules. Fernando Nasser and Tom Lane.
Tom Lane [Mon, 25 Feb 2002 21:37:42 +0000 (21:37 +0000)]
Tweak psql's \connect command to not downcase unquoted database and user
names. This is a temporary measure to allow backwards compatibility with
7.2 and earlier pg_dump. 7.2.1 and later pg_dump will double-quote mixed
case names in \connect. Once we feel that older dumps are not a problem
anymore, we can revert this change and treat \connect arguments as normal
SQL identifiers.
Bruce Momjian [Mon, 25 Feb 2002 18:48:54 +0000 (18:48 +0000)]
Add items and JDBC maintainers:
> o Add LISTEN/NOTIFY support to the JDBC driver (Barry) 479a481
> * Barry is Barry Lind <barry@xythos.com> 482a485
> * Dave is Dave Cramer <dave@fastcrypt.com>
Bruce Momjian [Mon, 25 Feb 2002 06:23:54 +0000 (06:23 +0000)]
Update completed items:
> * -Prevent SIGHUP and 'pg_ctl reload' from changing command line
> * -Remove LIMIT #,# and force use LIMIT and OFFSET clauses in 7.3 (Bruce)
> * -Prevent create/drop scripts from allowing extra args (Bruce)
> * -Have pg_dump -C dump database location and encoding information
Bruce Momjian [Mon, 25 Feb 2002 04:21:55 +0000 (04:21 +0000)]
This patch will allow arbitrary levels of analyze / rewriting
by making the static variables extra_before and extra_after
automatic so we can use recursion.
It gets much easier to generate extra commands now, and one can rest
assured that the extra commands will be properly analyzed/rewritten.
Without this patch, if a command produced by transformation tries to
use these static lists their first contents would be lost with
unpredictable results. I know I could fix this by just using nconc()
instead of assignments, but the resulting order of the commands would
not be exactly what one could expect.
Bruce Momjian [Mon, 25 Feb 2002 04:06:52 +0000 (04:06 +0000)]
I've attached a simple patch which should improve the performance of
hashname() and reduce the penalty incured when NAMEDATALEN is increased.
I posted this to -hackers a couple days ago, and there haven't been any
major complaints. It passes the regression tests. See -hackers for more
discussion, as well as the suggestion from Tom Lane on which this patch
is based.
Unless anyone sees any problems, please apply for 7.3.
Tom Lane [Sun, 24 Feb 2002 21:57:23 +0000 (21:57 +0000)]
Modify pg_dumpall so that output script uses new OWNER option of CREATE
DATABASE; also make it use SET SESSION AUTHORIZATION commands rather than
\connect commands. This makes it possible to restore databases belonging
to users who do not have CREATEDB privilege. It should also become at
least somewhat feasible to run the restore script under password
authentication --- you'll get one superuser password prompt per database,
rather than a large number of challenges for passwords belonging to
varying unspecified user names.
Tom Lane [Sun, 24 Feb 2002 20:20:21 +0000 (20:20 +0000)]
Add OWNER option to CREATE DATABASE, so superusers can create databases
on behalf of unprivileged users. Also, make '=' optional in CREATE
DATABASE syntax. From Gavin Sherry, with kibitzing and docs by Tom Lane.
Bruce Momjian [Sat, 23 Feb 2002 21:49:10 +0000 (21:49 +0000)]
OK'ed by Peter.
The attached patch enables plperl to build under Cygwin. It is
basically yet another BE_DLLLIBS patch with a perl MakeMaker twist. I
tried the patch under Red Hat 7.1 Linux too and I did not observe any
ill effects.
Tom Lane [Sat, 23 Feb 2002 20:55:46 +0000 (20:55 +0000)]
Guard against createdb --location=PGDATA foo; without this, the code
tries to create a symlink pointing at itself. Per trouble report from
Kenneth McDowell.
Bruce Momjian [Fri, 22 Feb 2002 05:47:50 +0000 (05:47 +0000)]
Please, apply attached patch of contrib/btree_gist to 7.2.1 and current
cvs.
The patch fixes memory leak during creation GiST index on timestamp
column.
Dave Cramer [Fri, 22 Feb 2002 02:58:24 +0000 (02:58 +0000)]
This patch fixes the exception thrown to inform the user the method
getColumnClassName(int) is not implemented. This will futher fixes method
ResultSet.getObject(int) since it requires the getColumnClassName(int) method to return the proper java class used to map the database column.