Tom Lane [Wed, 5 May 2004 16:09:31 +0000 (16:09 +0000)]
Use a more portable technique for unsetting environment variables,
and unset PGCLIENTENCODING to prevent backend from dying if it's set
to something incompatible with the -E option.
Bruce Momjian [Wed, 5 May 2004 14:36:20 +0000 (14:36 +0000)]
Done:
o -ALTER TABLE ADD COLUMN does not honor DEFAULT and non-CHECK CONSTRAINT
o -ALTER TABLE ADD COLUMN column DEFAULT should fill existing
rows with DEFAULT value
o -Allow ALTER TABLE to modify column lengths and change to binary
compatible types
Remove:
o Allow columns to be reordered using ALTER ... POSITION i col1 [,col2];
have SELECT * and INSERT honor such ordering
Tom Lane [Wed, 5 May 2004 04:48:48 +0000 (04:48 +0000)]
ALTER TABLE rewrite. New cool stuff:
* ALTER ... ADD COLUMN with defaults and NOT NULL constraints works per SQL
spec. A default is implemented by rewriting the table with the new value
stored in each row.
* ALTER COLUMN TYPE. You can change a column's datatype to anything you
want, so long as you can specify how to convert the old value. Rewrites
the table. (Possible future improvement: optimize no-op conversions such
as varchar(N) to varchar(N+1).)
* Multiple ALTER actions in a single ALTER TABLE command. You can perform
any number of column additions, type changes, and constraint additions with
only one pass over the table contents.
Basic documentation provided in ALTER TABLE ref page, but some more docs
work is needed.
Original patch from Rod Taylor, additional work from Tom Lane.
Bruce Momjian [Sun, 2 May 2004 13:38:28 +0000 (13:38 +0000)]
Revert patch --- needs more generalized solution.
> Please find a attached a small patch that adds accessor functions
> for "aclitem" so that it is not an opaque datatype.
>
> I needed these functions to browse aclitems from user land. I can load
> them when necessary, but it seems to me that these accessors for a
> backend type belong to the backend, so I submit them.
>
> Fabien Coelho
Bruce Momjian [Mon, 26 Apr 2004 15:24:42 +0000 (15:24 +0000)]
Please find attached a small patch against current cvs head, so that
'information_schema' is considered a system schema by various
pg_stat*_*_{tables,sequences} views.
Bruce Momjian [Mon, 26 Apr 2004 15:06:49 +0000 (15:06 +0000)]
Please find a attached a small patch that adds accessor functions
for "aclitem" so that it is not an opaque datatype.
I needed these functions to browse aclitems from user land. I can load
them when necessary, but it seems to me that these accessors for a
backend type belong to the backend, so I submit them.
Neil Conway [Sun, 25 Apr 2004 23:50:58 +0000 (23:50 +0000)]
Tiny assorted fixes: correct a typo in a comment in vacuumlazy.c, remove
some unused #include directives from bufmgr.c, and clarify comments in
bufmgr.h and buf.h
Neil Conway [Sat, 24 Apr 2004 22:53:44 +0000 (22:53 +0000)]
Document that PQoidValue(), PQcmdTuples(), and PQoidStatus() now work
when the command that generated the PGresult was an EXECUTE of an
appropriate prepared statement.
Neil Conway [Fri, 23 Apr 2004 20:32:20 +0000 (20:32 +0000)]
Add ceiling() as an alias for ceil(), and power() as an alias for pow().
Regression tests and documentation have both been updated.
SQL2003 requires that both ceiling() and ceil() be present, so I have
documented both spellings. SQL2003 doesn't mention pow() as far as I
can see, so I decided to replace pow() with power() in the documentation:
there is little reason to encourage the continued usage of a function
that isn't compliant with the standard, given a standard-compliant
alternative.
RELEASE NOTES: should state that pow() is considered deprecated
(although I don't see the need to ever remove it.)
Bruce Momjian [Thu, 22 Apr 2004 03:48:38 +0000 (03:48 +0000)]
Attached is are a few small fixes for dbmirror.
1. Fixed bug where sequences were being mirrored incorrectly if they
exceeded 127
2. Fixed a bug in the perl script with mirroring sequences(John
Burtenshaw sent an email to patches describing the bug in March but I
htink he forgot to attach his patch)
3. The dates/times in the transaction files will always use 2 digits.
Bruce Momjian [Thu, 22 Apr 2004 02:58:21 +0000 (02:58 +0000)]
This patch makes the EXECUTE command's completion tag return the
completion tag of the actual statement executed. This allows the
correct update count to be returned for UPDATE/INSERT/DELETE
statements.
Bruce Momjian [Thu, 22 Apr 2004 02:39:10 +0000 (02:39 +0000)]
Please find attached a small patch so that "pg_restore" ignores some sql
errors. This is the second submission, which integrates Tom comments about
localisation and exit code. I also added some comments about one sql
command which is not ignored.
Tom Lane [Wed, 21 Apr 2004 18:24:26 +0000 (18:24 +0000)]
Tweak indexscan and seqscan code to arrange that steps from one page to
the next are handled by ReleaseAndReadBuffer rather than separate
ReleaseBuffer and ReadBuffer calls. This cuts the number of acquisitions
of the BufMgrLock by a factor of 2 (possibly more, if an indexscan happens
to pull successive rows from the same heap page). Unfortunately this
doesn't seem enough to get us out of the recently discussed context-switch
storm problem, but it's surely worth doing anyway.
Tom Lane [Wed, 21 Apr 2004 18:06:30 +0000 (18:06 +0000)]
Another round of code cleanup on bufmgr. Use BM_VALID flag to keep track
of whether we have successfully read data into a buffer; this makes the
error behavior a bit more transparent (IMHO anyway), and also makes it
work correctly for local buffers which don't use Start/TerminateBufferIO.
Collapse three separate functions for writing a shared buffer into one.
This overlaps a bit with cleanups that Neil proposed awhile back, but
seems not to have committed yet.
Bruce Momjian [Tue, 20 Apr 2004 16:56:19 +0000 (16:56 +0000)]
Add doc mention that:
process directly. Some parameters can only be set at server start;
any changes to their entries in the configuration file will be ignored
until the server is restarted.