Tom Lane [Mon, 1 Apr 2002 22:36:13 +0000 (22:36 +0000)]
Add tgconstrrelid to stored Trigger structures, make RI trigger functions
depend on this rather than the trigger argument strings to locate the
other relation to test. This makes RI triggers function properly in
the presence of schemas and temp tables. Along the way, fix bogus lack
of locking in RI triggers, handle quoting of names fully correctly,
compute required sizes of query buffers with some semblance of accuracy.
Tom Lane [Mon, 1 Apr 2002 03:34:27 +0000 (03:34 +0000)]
Create a new GUC variable search_path to control the namespace search
path. The default behavior if no per-user schemas are created is that
all users share a 'public' namespace, thus providing behavior backwards
compatible with 7.2 and earlier releases. Probably the semantics and
default setting will need to be fine-tuned, but this is a start.
1) Add rollback functionality to updatable cursors.
2) Implement some options for SQLGetDescField().
3) Handle *Inifinity* timestamp for SQL_C_CHAR type output.
4) Separate Unicode conversions from common implementations.
5) Improve internal parse_statement() function.
Tom Lane [Mon, 1 Apr 2002 02:02:34 +0000 (02:02 +0000)]
Temporary kluge to let RI triggers work on tables outside the system
catalog namespace. This will not do as a production solution because
the interpretation of RI trigger arguments will vary depending on the
current namespace search path. I'm just putting it in so that the RI
regression tests don't fail while schema development proceeds. We
must find a better answer before 7.3 can be released.
Tom Lane [Sun, 31 Mar 2002 07:49:30 +0000 (07:49 +0000)]
Make renamerel take an OID, not a RangeVar, to identify the relation
to rename. Avoids some corner-case bugs in cluster.c, improves
consistency with renameatt.
Tom Lane [Sat, 30 Mar 2002 01:02:42 +0000 (01:02 +0000)]
Further cleanups for relations in schemas: teach nextval and other
sequence functions how to cope with qualified names. Same code is
also used for int4notin, currtid_byrelname, pgstattuple. Also,
move TOAST tables into special pg_toast namespace.
Tom Lane [Fri, 29 Mar 2002 19:06:29 +0000 (19:06 +0000)]
pg_type has a typnamespace column; system now supports creating types
in different namespaces. Also, cleanup work on relation namespace
support: drop, alter, rename commands work for tables in non-default
namespaces.
Peter Eisentraut [Fri, 29 Mar 2002 17:32:55 +0000 (17:32 +0000)]
Upgrade to Autoconf version 2.53. Replaced many custom macro
calls with new or now-built-in versions. Make sure that all
calls to AC_DEFINE have a third argument, for possible use of
autoheader in the future.
Hiroshi Inoue [Thu, 28 Mar 2002 08:08:07 +0000 (08:08 +0000)]
[2002-03-28]
1) Prepare to separate 4 kinds of Descriptor handles.
2) Detect the transaction status more naturally.
3) Improve Parse Statement functionality for the use
of updatable cursors.
4) Improve updatable cursors.
5) Implement SQLGetDescField() and improve SQLColAttribute().
6) etc.
Barry Lind [Wed, 27 Mar 2002 05:33:27 +0000 (05:33 +0000)]
applied patch from Liam Stewart fixing a message in the properties file
also fixed a NPE when calling the next() method on a result set after the
connection or resultset has been closed. (bug reported by Hans Deragon)
Tom Lane [Tue, 26 Mar 2002 19:17:02 +0000 (19:17 +0000)]
pg_class has a relnamespace column. You can create and access tables
in schemas other than the system namespace; however, there's no search
path yet, and not all operations work yet on tables outside the system
namespace.
Barry Lind [Tue, 26 Mar 2002 05:52:50 +0000 (05:52 +0000)]
Changed QueryExecutor.java to correctly read responses from the backend.
Fixed NPE when database name was not passed on the jdbc connection URL
Fixed Connection.isClosed() to not hit the DB for every call
Tom Lane [Sun, 24 Mar 2002 04:31:09 +0000 (04:31 +0000)]
EXPLAIN output now comes out as a query result, not a NOTICE message.
Also, fix debug logging of parse/plan trees so that the messages actually
go through elog(), not directly to stdout.
Tom Lane [Fri, 22 Mar 2002 02:56:37 +0000 (02:56 +0000)]
A little further progress on schemas: push down RangeVars into
addRangeTableEntry calls. Remove relname field from RTEs, since
it will no longer be a useful unique identifier of relations;
we want to encourage people to rely on the relation OID instead.
Further work on dumping qual expressions in EXPLAIN, too.
Tom Lane [Thu, 21 Mar 2002 23:27:25 +0000 (23:27 +0000)]
Change the aclchk.c routines to uniformly use OIDs to identify the
objects to be privilege-checked. Some change in their APIs would be
necessary no matter what in the schema environment, and simply getting
rid of the name-based interface entirely seems like the best way.
Tom Lane [Thu, 21 Mar 2002 16:02:16 +0000 (16:02 +0000)]
First phase of SCHEMA changes, concentrating on fixing the grammar and
the parsetree representation. As yet we don't *do* anything with schema
names, just drop 'em on the floor; but you can enter schema-compatible
command syntax, and there's even a primitive CREATE SCHEMA command.
No doc updates yet, except to note that you can now extract a field
from a function-returning-row's result with (foo(...)).fieldname.
Dave Cramer [Thu, 21 Mar 2002 03:20:30 +0000 (03:20 +0000)]
Two versions of QueryExecutor, currently only version 2 works 100%
these versions adhere to the backend protocol better than previous version
fixes problem when an error occurs on the backend, and the connection is still used
previous versions were throwing an exception half way through the protocol, leaving it
indeterminate.
also removes empty query code, should speed things up a bit
Dave Cramer [Thu, 21 Mar 2002 02:52:37 +0000 (02:52 +0000)]
modifications to the way the protocol is handled to be consistent with
QueryExecutor. This includes:
1) only exit after we receive a 'Z' packet
2) append error messages to a buffer and throw the exception at the end
Dave Cramer [Thu, 21 Mar 2002 02:39:06 +0000 (02:39 +0000)]
Applied Anders patch to move the startup code out of Connection into StartupPacket
* Introduces a new class, StartupPacket.
* Moves a lot of constants from Connection to StartupPacket.
* Makes two instance variables in Connection into locals.
PyGreSQL causes a segfault when used with a Python executable that was
compiled with --with-pymalloc. This change fixes that. Thanks to
Dave Wallace <dwallace@udel.edu>
Bruce Momjian [Tue, 19 Mar 2002 14:15:55 +0000 (14:15 +0000)]
> > Users of contrib/tsearch needs after upgrading of module (compiling, installing)
> > to perform sql command:
> > update pg_amop set amopreqcheck = true where amopclaid =
> > (select oid from pg_opclass where opcname = 'gist_txtidx_ops');
>
> Oleg, sorry, I don't understand where this should appear. In the README
> file, and if so, where? Is this something only for people upgrading
> from 7.2?
Sorry Bruce, I was unclear. I have attached patch to Readme.tsearch
Also, It'd be worth to mention in Changes to point users of tsearch
about importang upgrade notices.
Bruce Momjian [Tue, 19 Mar 2002 14:14:44 +0000 (14:14 +0000)]
> > Users of contrib/tsearch needs after upgrading of module (compiling, installing)
> > to perform sql command:
> > update pg_amop set amopreqcheck = true where amopclaid =
> > (select oid from pg_opclass where opcname = 'gist_txtidx_ops');
>
> Oleg, sorry, I don't understand where this should appear. In the README
> file, and if so, where? Is this something only for people upgrading
> from 7.2?
Sorry Bruce, I was unclear. I have attached patch to Readme.tsearch
Also, It'd be worth to mention in Changes to point users of tsearch
about importang upgrade notices.
Bruce Momjian [Tue, 19 Mar 2002 02:58:20 +0000 (02:58 +0000)]
The attached patch cleans up the implementation of the TRUNCATE command;
in the current code, the authentication logic (check user, check the
relation we're operating on, etc) is done in tcop/utility.c, whereas the
actual TRUNCATE command in done in TruncateRelation() in
commands/createinh.c (which is really just a wrapper over
heap_truncate() in catalog/heap.c). This patch moves the authentication
logic into TruncateRelation(), as well as making some minor code
cleanups.
Bruce Momjian [Tue, 19 Mar 2002 02:57:15 +0000 (02:57 +0000)]
Fix for trigger handling:
* We should not even consider checking the row if it is no longer
* valid since it was either deleted (doesn't matter) or updated
* (in which case it'll be checked with its final values).
Bruce Momjian [Tue, 19 Mar 2002 02:47:57 +0000 (02:47 +0000)]
> I am backing out this patch. Please resubmit with this corrected. Thanks.
>
> I am running Python 1.5.
Therein lies the problem... :)
Since it appears you have the requirement of supporting old python
versions, attached is just the pgdb.py part of the patch (with a fix for
DateTime handling). It has the same functionality but certainly won't be
quite as fast. Given the absence of _PyString_Join in python1.5, it's a
pain to get the C variants working for all versions. The pgdb.py patch
does leaves the hooks in, should someone wish to do the optimization at a
later point.
Dave Cramer [Tue, 19 Mar 2002 01:32:48 +0000 (01:32 +0000)]
applied patch from Liam Stewart
If one is trying to compile a JDBC 1 driver and junit.jar is in the
CLASSPATH, then the build fails as ant tries to build the JDBC 2 test
classes. This patch fixes this problem by excluding the jdbc 2 files
unless the jdk1.2+ property is set.
Tom Lane [Sat, 16 Mar 2002 22:47:13 +0000 (22:47 +0000)]
Try to make array_in's behavior a tad less bizarre. Leading whitespace
before a data item is now always skipped, rather than only sometimes.
Backslashes not within double-quoted text are treated reasonably, as
are multiple sequences of quoted text in a single data item. But it
still seems rather prone to misbehavior if the input is not completely
syntactically correct --- in particular, garbage following a right brace
will be ignored.
Dave Cramer [Sat, 16 Mar 2002 02:15:23 +0000 (02:15 +0000)]
fixed QueryExecuter to deal with multiple errors
previously it was throwing a SQLException as soon as the error message was
received from the backend. This did not allow the protocol to finish properly
now, simply collects error messages from the backend until the query is done
and throws exception at the end
Also added setLogLevel to Driver.java, and made the log levels public
Tom Lane [Fri, 15 Mar 2002 19:20:36 +0000 (19:20 +0000)]
Repair two problems with WAL logging of sequence nextvalI() ops, as
per recent pghackers discussion: force a new WAL record at first nextval
after a checkpoint, and ensure that xlog is flushed to disk if a nextval
record is the only thing emitted by a transaction.
Bruce Momjian [Fri, 15 Mar 2002 15:55:58 +0000 (15:55 +0000)]
Fix for docs from Patrick Welche:
! DIFFERENCE (− or ∖): builds the set difference of
two tables. Let <classname>R</classname> and
<classname>S</classname>
again be two tables with the same
arity. <classname>R</classname> - <classname>S</classname>
--- 488,494 ----
<listitem>
<para>
! EXCEPT (− or ∖): builds the set difference of
Bruce Momjian [Thu, 14 Mar 2002 22:44:50 +0000 (22:44 +0000)]
The attached patch changes ALTER TABLE OWNER to also change the
ownership of any toast tables that belong to the table that is being
operated upon (as suggested by Tom Lane).
Tom Lane [Tue, 12 Mar 2002 00:52:10 +0000 (00:52 +0000)]
Restructure representation of join alias variables. An explicit JOIN
now has an RTE of its own, and references to its outputs now are Vars
referencing the JOIN RTE, rather than CASE-expressions. This allows
reverse-listing in ruleutils.c to use the correct alias easily, rather
than painfully reverse-engineering the alias namespace as it used to do.
Also, nested FULL JOINs work correctly, because the result of the inner
joins are simple Vars that the planner can cope with. This fixes a bug
reported a couple times now, notably by Tatsuo on 18-Nov-01. The alias
Vars are expanded into COALESCE expressions where needed at the very end
of planning, rather than during parsing.
Also, beginnings of support for showing plan qualifier expressions in
EXPLAIN. There are probably still cases that need work.
initdb forced due to change of stored-rule representation.