Tom Lane [Tue, 6 Apr 2004 16:39:30 +0000 (16:39 +0000)]
ALTER SEQUENCE RESTART did the wrong thing if sequence last_value was
equal to the desired restart value (must clear is_called, did not).
Per bug report #1127 from Piotr Konieczny.
Bruce Momjian [Tue, 6 Apr 2004 13:21:33 +0000 (13:21 +0000)]
The attached applied patch throws an error if the delimiter appears in
the COPY NULL string:
test=> copy pg_language to '/tmp/x' with delimiter '|';
COPY
test=> copy pg_language to '/tmp/x' with delimiter '|' null '|x';
ERROR: COPY delimiter must not appear in the NULL specification
test=> copy pg_language from '/tmp/x' with delimiter '|' null '|x';
ERROR: COPY delimiter must not appear in the NULL specification
It also throws an error if it conflicts with the default NULL string:
test=> copy pg_language to '/tmp/x' with delimiter '\\';
ERROR: COPY delimiter must not appear in the NULL specification
test=> copy pg_language to '/tmp/x' with delimiter '\\' NULL 'x';
COPY
Bruce Momjian [Mon, 5 Apr 2004 03:11:39 +0000 (03:11 +0000)]
This is a cleanup patch for access/transam/xact.c. It only removes some
#ifdef NOT_USED code, and adds a new TBLOCK state which signals the fact
that StartTransaction() has been executed.
Bruce Momjian [Mon, 5 Apr 2004 02:48:09 +0000 (02:48 +0000)]
Improve handling of GUC USERLIMIT variables by reorganizing code. Also,
handle new postgresql.conf values with SIGHUP better by better enforcing
USERLIMIT settings on existing non-super-user backends.
Tom Lane [Fri, 2 Apr 2004 23:14:08 +0000 (23:14 +0000)]
check_sql_fn_retval has always thought that we supported doing
'SELECT foo()' in a SQL function returning a rowtype, to simply pass
back the results of another function returning the same rowtype.
However, that hasn't actually worked in many years. Now it works again.
Tom Lane [Thu, 1 Apr 2004 21:59:45 +0000 (21:59 +0000)]
Adjust expected regression outputs for plan changes caused by recent
'fuzzy cost comparison' patch. Mea culpa for not having noticed this
when I committed the patch.
Tom Lane [Thu, 1 Apr 2004 21:28:47 +0000 (21:28 +0000)]
Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums. This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables. However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well. Per my proposal of a few days ago.
1. In keeping with the recent discussion that there should be more
said about views, stored procedures, and triggers, in the tutorial, I
have added a bit of verbiage to that end.
2. Some formatting changes to the datetime discussion, as well as
addition of a citation of a relevant book on calendars.
Bruce Momjian [Tue, 30 Mar 2004 21:58:20 +0000 (21:58 +0000)]
1. In keeping with the recent discussion that there should be more
said about views, stored procedures, and triggers, in the tutorial, I
have added a bit of verbiage to that end.
2. Some formatting changes to the datetime discussion, as well as
addition of a citation of a relevant book on calendars.
Teodor Sigaev [Tue, 30 Mar 2004 15:45:33 +0000 (15:45 +0000)]
Cleanup vectors of GISTENTRY and eliminate problem with 64-bit strict-aligned
boxes. Change interface to user-defined GiST support methods union and
picksplit. Now instead of bytea struct it used special GistEntryVector
structure.
Tom Lane [Mon, 29 Mar 2004 19:58:04 +0000 (19:58 +0000)]
Use fuzzy comparison of path costs in add_path(), so that paths with the
same path keys and nearly equivalent costs will be considered redundant.
The exact nature of the fuzziness may get adjusted later based on current
discussions, but no one has shot a hole in the basic idea yet ...
Tom Lane [Sat, 27 Mar 2004 00:24:28 +0000 (00:24 +0000)]
Now that we are allowing index opclasses to contain operators that are
only stable and not immutable, pred_test_simple_clause has to guard
against making invalid deductions. Add a test for immutability of
the selected test_op.
Teodor Sigaev [Thu, 25 Mar 2004 16:56:10 +0000 (16:56 +0000)]
1 Minimize memory allocation for void (but not null) value.
2 Add silly ordering for ts_vector to aim grouping, union, except etc. Don't use BTree opclass (tsvector_ops).
Tom Lane [Wed, 24 Mar 2004 23:38:49 +0000 (23:38 +0000)]
Add a more useful error message for the case where someone tries to pass
a whole row or record variable into a SQL function. Eventually this case
should be made to actually work, but for now this is better than what it
did before.
Tom Lane [Wed, 24 Mar 2004 22:40:29 +0000 (22:40 +0000)]
Replace max_expr_depth parameter with a max_stack_depth parameter that
is measured in kilobytes and checked against actual physical execution
stack depth, as per my proposal of 30-Dec. This gives us a fairly
bulletproof defense against crashing due to runaway recursive functions.
Bruce Momjian [Wed, 24 Mar 2004 04:04:51 +0000 (04:04 +0000)]
Here's a patch implementing the "thread method" to workaround the bug
with socket calls in signal handlers (APC) on Win32. See details in mail
to pgsql-hackers-win32 a couple of minutes ago.
Neil Conway [Wed, 24 Mar 2004 03:22:35 +0000 (03:22 +0000)]
Fix some whitespace formatting, and remove an overly-verbose
parameter description: postgresql.conf is not the place for
documentating the functionality of a GUC var.
Bruce Momjian [Wed, 24 Mar 2004 03:10:29 +0000 (03:10 +0000)]
>>Also, what is the default connection mode of psql? It should probably be
>>equivalent to "-h localhost", shouldn't it?
>>
>>
>
>Now that is something I had not thought of. Seems we can assume a Win32
>psql can never use unix domain sockets, so defaulting that to localhost
>is a good solution too.
Bruce Momjian [Tue, 23 Mar 2004 21:39:46 +0000 (21:39 +0000)]
When changing select() calls for delays into pg_usleep(), two comments
in s_lock.c were not updated, and still refers to select. Made my grep
hit the wrong files, so I figured a simple patch was in order.. (other
refs in the same comment block was changed..)
Tom Lane [Tue, 23 Mar 2004 19:35:17 +0000 (19:35 +0000)]
Upgrade ALTER TABLE DROP COLUMN so that it can drop an OID column, and
remove separate implementation of ALTER TABLE SET WITHOUT OIDS in favor
of doing a regular DROP. Also, cause CREATE TABLE to account completely
correctly for the inheritance status of the OID column. This fixes
problems with dropping OID columns that have dependencies, as noted by
Christopher Kings-Lynne, as well as making sure that you can't drop an
OID column that was inherited from a parent.
Neil Conway [Tue, 23 Mar 2004 02:47:35 +0000 (02:47 +0000)]
Improve the locale and character set docs, add some <xref>s pointing
to the character set docs where appropriate, and improve the postmaster
reference page. Character set cross-refs suggested by Gavin Kistner.
Tom Lane [Tue, 23 Mar 2004 01:23:48 +0000 (01:23 +0000)]
Replace the virtual_host and tcpip_socket parameters with a unified
listen_addresses parameter, as per recent discussion. The default behavior
is now to listen on localhost, which eliminates the need for the -i
postmaster switch in many scenarios.
Tom Lane [Mon, 22 Mar 2004 23:55:29 +0000 (23:55 +0000)]
Before deciding we can use a socket for statistics collection, test to
ensure that it actually passes data. This catches cases such as a kernel
packet filter rule that makes the socket useless.
Bruce Momjian [Mon, 22 Mar 2004 03:57:08 +0000 (03:57 +0000)]
In working through a pg_autovacuum problem with Joe Conway (which turned
out to be the same problem reported by Cott Lang which the previous
patch resolved) a new bug was uncovered when running with a debug level
of greater than 1.
This patch resolves this new found bug and fixes some of the other
debugging output to be more consistent.
Tom Lane [Mon, 22 Mar 2004 01:38:18 +0000 (01:38 +0000)]
Add timestamp-versus-timestamptz cross-type comparison functions,
flesh out the index operator classes to include these. In passing,
fix erroneous volatility marking of ACL functions.
Tom Lane [Sun, 21 Mar 2004 22:29:11 +0000 (22:29 +0000)]
Revise syntax-error reporting behavior to give pleasant results for
errors in internally-generated queries, such as those submitted by
plpgsql functions. Per recent discussions with Fabien Coelho.