Tom Lane [Tue, 5 Aug 2003 18:30:21 +0000 (18:30 +0000)]
Improve documentation of ParseDateTime(). Reorder tests to prevent
writing one more value into return arrays than will fit. This is
potentially a stack smash, though I do not think it is a problem in
current uses of the routine, since a failure return causes elog anyway.
Tom Lane [Tue, 5 Aug 2003 17:39:19 +0000 (17:39 +0000)]
Fix several places where fractional-second inputs were misprocessed
in HAVE_INT64_TIMESTAMP cases, including two potential stack smashes
when more than six fractional digits were supplied. Per bug report
from Philipp Reisner.
Tom Lane [Mon, 4 Aug 2003 17:58:14 +0000 (17:58 +0000)]
SSL_read/SSL_write do not approximate the return conventions of recv()
and send() very well at all; and in any case we can't use retval==0
for EOF due to race conditions. Make the same fixes in the backend as
are required in libpq.
Tom Lane [Sun, 3 Aug 2003 23:46:37 +0000 (23:46 +0000)]
Tighten inline_function's test for overly complex parameters. This
should catch most situations where repeated inlining blows up the
expression complexity unreasonably, as in Joe Conway's recent example.
Bruce Momjian [Fri, 1 Aug 2003 22:18:15 +0000 (22:18 +0000)]
Update, add Greg:
< * Fernando Nasser <fnasser@redhat.com> of Red Hat
< * Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
> * Fernando is Fernando Nasser <fnasser@redhat.com> of Red Hat
> * Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
> * Greg is Greg Sabino Mullane <greg@turnstep.com>
Tom Lane [Fri, 1 Aug 2003 21:27:27 +0000 (21:27 +0000)]
Code review for sslmode patch: eliminate memory leak, avoid giving a
completely useless error message in 'allow' case, don't retry connection
at the sendauth stage (by then the server will either let us in or not,
no point in wasting cycles on another try in the other SSL state).
Tom Lane [Fri, 1 Aug 2003 19:12:52 +0000 (19:12 +0000)]
Since HPUX now exists for Itanium, we should decouple the assumption
that OS=hpux is the same as CPU=hppa. First steps at doing this.
With these patches, we still work on hppa with either gcc or HP's cc.
We might work on hpux/itanium with gcc, but I can't test it. Definitely
will not work on hpux/itanium with non-gcc compiler, for lack of spinlock
code.
Tom Lane [Thu, 31 Jul 2003 19:20:41 +0000 (19:20 +0000)]
When using a temp installation, unset PGUSER and other variables we
might have inherited from the environment that would possibly cause
psql to fail to connect to the temp installation properly. Per trouble
report from Markus Bertheau 7/1/03.
Tom Lane [Thu, 31 Jul 2003 18:36:46 +0000 (18:36 +0000)]
Cause library-preload feature to report error if specified initialization
function is not found. Also, make all the PL libraries have initialization
functions with standard names. Patch from Joe Conway.
Tom Lane [Thu, 31 Jul 2003 17:21:57 +0000 (17:21 +0000)]
Upgrade parsing code for ACLs to be less hokey and more cognizant of
the actual logical structure and quoting rules being used. Fixes bug
reported by Chris K-L on 7/8/03.
Bruce Momjian [Thu, 31 Jul 2003 02:12:43 +0000 (02:12 +0000)]
dbf2pg - Insert xBase-style .dbf-files into a PostgreSQL-table
There is an option "-s oldname=newname", which changes the old field name of
the dbf-file to the newname in PostgeSQL. If the length of the new name is 0,
the field is skiped. If you want to skip the first field of the dbf-file,
you get the wildest error-messages from the backend.
dbf2pg load the dbf-file via "COPY tablename FROM STDIN". If you skip the
first field, it is an \t to much in STDIN.
A fix could be an counter j=0, which increments only, if a field is imported
(IF (strlen(fields[h].db_name)> 0) j++. And only if j > 1 (if an other field is
imported) the \t is printed.
An other small bug in the README:
-s start
Specify the first record-number in the xBase-file
we will insert.
should be
-e start
Specify the first record-number in the xBase-file
we will insert.
Tom Lane [Wed, 30 Jul 2003 19:48:41 +0000 (19:48 +0000)]
Fix numeric_smaller, numeric_larger, float4smaller, float4larger,
float8smaller, float8larger (and thereby the MIN/MAX aggregates on these
datatypes) to agree with the datatypes' comparison operations as
regards NaN handling. In all these datatypes, NaN is arbitrarily
considered larger than any normal value ... but MIN/MAX had not gotten
the word. Per recent discussion on pgsql-sql.
Tom Lane [Wed, 30 Jul 2003 19:02:18 +0000 (19:02 +0000)]
Cause ARRAY[] construct to return a NULL array, rather than raising an
error, if any input element is NULL. This is not what we ultimately want,
but until arrays can have NULL elements, it will have to do. Patch from
Joe Conway.
Tom Lane [Wed, 30 Jul 2003 17:08:47 +0000 (17:08 +0000)]
When shutting down the regression test postmaster after 'make check',
wait for the postmaster to actually exit. Otherwise running repeated
'make check's tends to misbehave, because we try to remove and recreate
the data directory while the old PM is still alive.
Tom Lane [Tue, 29 Jul 2003 22:18:38 +0000 (22:18 +0000)]
Fix longstanding error in _bt_search(): should moveright at top of loop not
bottom. Otherwise we fail to moveright when the root page was split while
we were "in flight" to it. This is not a significant problem when the root
is above the leaf level, but if the root was also a leaf (ie, a single-page
index just got split) we may return the wrong leaf page to the caller,
resulting in failure to find a key that is in fact present. Bug has existed
at least since 7.1, probably forever.
Tom Lane [Tue, 29 Jul 2003 17:21:27 +0000 (17:21 +0000)]
Coerce unknown-literal-constant default values to the column type during
CREATE TABLE (or ALTER TABLE SET DEFAULT), rather than postponing it to
the time that the default is inserted into an INSERT command by the
rewriter. This reverses an old decision that was intended to make the
world safe for writing
f1 timestamp default 'now'
but in fact merely made the failure modes subtle rather than obvious.
Per recent trouble report and followup discussion.
initdb forced since there is a chance that stored default expressions
will change.