Measure the current transaction time to milliseconds.
Define a new function, GetCurrentTransactionStartTimeUsec() to get the time
to this precision.
Allow now() and timestamp 'now' to use this higher precision result so
we now have fractional seconds in this "constant".
Add timestamp without time zone type.
Move previous timestamp type to timestamp with time zone.
Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss
(note the "T" separating the day from hours information).
Remove 'current' from date/time types; convert to 'now' in input.
Separate time and timetz regression tests.
Separate timestamp and timestamptz regression test.
Add separate regression tests for timetz and the new timestamptz type.
Modify the timestamp test to reflect the "no time zone" behavior of this
new code; timestamptz resembles the old timestamp code.
Tom Lane [Wed, 26 Sep 2001 21:09:27 +0000 (21:09 +0000)]
Repair oversight in recent changes to index-creation: tuple time qual
check *can* return HEAPTUPLE_INSERT_IN_PROGRESS or HEAPTUPLE_DELETE_IN_PROGRESS,
even though we have ShareLock on the relation. To wit, this can happen
if the tuple was inserted/deleted by our own transaction. Per report from
Justin Clift 9/23.
Tom Lane [Wed, 26 Sep 2001 20:24:02 +0000 (20:24 +0000)]
Remove useless test for time field in pg_control being > 0. We don't
need this, and it will create a Y2038 failure. Per report from David
Wheeler, who is evidently running on a platform where time_t is already
negative.
Bruce Momjian [Sun, 23 Sep 2001 04:12:44 +0000 (04:12 +0000)]
Big thanks to Solar Designer who pointed out a bug in bcrypt
salt generation code. He also urged using better random source
and making possible to choose using bcrypt and xdes rounds more
easily. So, here's patch:
* For all salt generation, use Solar Designer's own code. This
is mostly due fact that his code is more fit for get_random_bytes()
style interface.
* New function: gen_salt(type, rounds). This lets specify iteration
count for algorithm.
* random.c: px_get_random_bytes() function.
Supported randomness soure: /dev/urandom, OpenSSL PRNG, libc random()
Default: /dev/urandom.
* Draft description of C API for pgcrypto functions.
Bruce Momjian [Sun, 23 Sep 2001 04:11:14 +0000 (04:11 +0000)]
The attached patch is my first run-through of the JDBC test suite. A
summary of changes:
. removal of the tablename property from build.xml
. addition of a dropTable method in JDBC2Tests and cleanups of many
methods in the same
. all tests now use non-deprecated assertXYZ methods instead of the
deprecated assert method
. failure in TimestampTest (testSetTimestamp) fixed. The failure is
because testSetTimestamp was inserting a timestamp with hour 7 but
checkTimeTest was expecting a timestamp with hour 8. AFAICS, there are
no issues wrt daylight savings time and timestamps being pushed in and
pulled out (but more explicit tests should be added in the future)
. failure in TimeTest (testGetTime) fixed. Times to be inserted were
interpreted in the localtime zone but checking was done with the
assumption that the insertion was done in GMT.
. formatting changes in a few of the source files (because I found
it convenient to have consistent formatting while working on them). The
formatting is consistent with the new format for java source files in
PostgreSQL.
Peter Eisentraut [Sat, 22 Sep 2001 22:54:33 +0000 (22:54 +0000)]
Provide some initial support for building the ODBC driver for
an already installed iODBC or unixODBC driver manager. In particular,
use the include files provided by the driver manager over our own,
and use the odbcinst library of the driver manager rather than gpps.c.
Migrate portability sections common to several files into psqlodbc.h.
Tom Lane [Fri, 21 Sep 2001 17:06:12 +0000 (17:06 +0000)]
Add an overall timeout on the client authentication cycle, so that
a hung client or lost connection can't indefinitely block a postmaster
child (not to mention the possibility of deliberate DoS attacks).
Timeout is controlled by new authentication_timeout GUC variable,
which I set to 60 seconds by default ... does that seem reasonable?
Tom Lane [Fri, 21 Sep 2001 03:32:36 +0000 (03:32 +0000)]
Give VACUUM its own GUC parameter for memory usage, rather than
piggybacking on SortMem. Add documentation for some recently-added
GUC parameters that had so far escaped it.
Tom Lane [Fri, 21 Sep 2001 00:11:31 +0000 (00:11 +0000)]
Quick-and-dirty fix for recursive plpgsql functions, per bug report from
Frank Miles 7-Sep-01. This is really just sticking a finger in the dike.
Frank's case works now, but we still couldn't support a recursive function
returning a set. Really need to restructure querytrees and execution
state so that the querytree is *read only*. We've run into this over and
over and over again ... it has to happen sometime soon.
Michael Meskes [Wed, 19 Sep 2001 14:09:32 +0000 (14:09 +0000)]
- Synced preproc.y with gram.y.
- Synced pgc.l with scan.l.
- Synced keyword.c.
- Include the remaining patches by Christof Petig <christof.petig@wtal.de>.
Peter Eisentraut [Tue, 18 Sep 2001 12:08:27 +0000 (12:08 +0000)]
Generate index.html as the root file name of the documentation set,
rather than making index.html a symlink to the autogenerated name.
Fixes fatal problems with tar programs that don't handle symlinks
very well (MacOS X).
(The names user.html, admin.html, etc. are still available as make
targets, but they aren't packaged anymore.)
Use the manifest file that the stylesheets generate as the file list
for packaging. Put graphics in the right place while building, not
while packaging, so you can actually look at them after building.
Tom Lane [Tue, 18 Sep 2001 01:59:07 +0000 (01:59 +0000)]
EXPLAIN ANALYZE feature to measure and show actual runtimes and tuple
counts alongside the planner's estimates. By Martijn van Oosterhout,
with some further work by Tom Lane.
Tom Lane [Mon, 17 Sep 2001 20:05:47 +0000 (20:05 +0000)]
Fix bogus failure-return value from lo_create, per report from Gavin
Sherry. Also clean up leakage of open files and LOs in failure exits
from lo_import and lo_export.
Bruce Momjian [Mon, 17 Sep 2001 15:56:11 +0000 (15:56 +0000)]
Attached is a patch that fixes ResultSetMetaData.isNullable() in
the JDBC driver.
This method is currently unimplemented and always returns
ResultSetMetaData.columnNullable. This is obviously incorrect
when a column is defined with NOT NULL or PRIMARY KEY. And we
have to think of check constraints, views, functions etc.
The patch simply changes the return value to
ResultSetMetaData.columnNullableUnknown. This is until someone
comes up with a real implementation of course.
On Fri, 14 Sep 2001 17:53:50 +0200, Tomisaw Kity?ski wrote:
>Hello there,
>
>could someone tell me, please, do I have any chance to get
>proper implementation of above method in JDBC (1.1+) soon?
>
>Current "return 1" works fine on most tables, however it seems
>to be a little bit incorrect with some of them ;)
Bruce Momjian [Mon, 17 Sep 2001 15:54:50 +0000 (15:54 +0000)]
I'm attaching a patch which fixes the corruption in strings caused
by escape processing in the SQL statement. I've tested this for a
while now and it appears to work well. Previously string data
with {d was getting corrupt as the {d was being stripped regardless
of whether it was an escape code or not.
I also added checking for time and timestamp escape processing strings
as per 11.3 in the specification. The patch is against the latest
CVS.
Peter Eisentraut [Sun, 16 Sep 2001 16:11:11 +0000 (16:11 +0000)]
Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout
and compatibility with binary packaging standards. Point backend's
default search location there. The contrib modules are also
installed in the said location, giving them the benefit of the
default search path as well. No changes in user interface
nevertheless.
Bruce Momjian [Fri, 14 Sep 2001 17:46:40 +0000 (17:46 +0000)]
> Here's a revised patch. Changes:
>
> 1. Now outputs '\\' instead of '\134' when using encode(bytea, 'escape')
> Note that I ended up leaving \0 as \000 so that there are no ambiguities
> when decoding something like, for example, \0123.
>
> 2. Fixed bug in byteain which allowed input values which were not valid
> octals (e.g. \789), to be parsed as if they were octals.
>
> Joe
>
Here's rev 2 of the bytea string support patch. Changes:
1. Added missing declaration for MatchBytea function
2. Added PQescapeBytea to fe-exec.c
3. Applies cleanly on cvs tip from this afternoon
I'm hoping that someone can review/approve/apply this before beta starts, so
I guess I'd vote (not that it counts for much) to delay beta a few days :-)