]> git.ipfire.org Git - thirdparty/postgresql.git/log
thirdparty/postgresql.git
19 years agocube_1 variant is needed in 7.4 branch, per results from buildfarm
Tom Lane [Sat, 16 Jul 2005 20:11:12 +0000 (20:11 +0000)] 
cube_1 variant is needed in 7.4 branch, per results from buildfarm
machine 'kudu'.

19 years agoThe geometry_2 variant appears to be needed in 7.4 branch as well as
Tom Lane [Sat, 16 Jul 2005 18:39:26 +0000 (18:39 +0000)] 
The geometry_2 variant appears to be needed in 7.4 branch as well as
later, per results from buildfarm member 'wallaroo'.

19 years agoFix bogus "extern int errno;" in back branches, per Andrew Dunstan.
Tom Lane [Sat, 16 Jul 2005 15:23:29 +0000 (15:23 +0000)] 
Fix bogus "extern int errno;" in back branches, per Andrew Dunstan.

19 years agoFix mis-backport of libpq memory leak fix. Per Michael Fuhr.
Tom Lane [Thu, 14 Jul 2005 14:07:41 +0000 (14:07 +0000)] 
Fix mis-backport of libpq memory leak fix.  Per Michael Fuhr.

19 years agoFix libpq memory leak during PQreset() --- closePGconn() was not
Tom Lane [Wed, 13 Jul 2005 15:26:16 +0000 (15:26 +0000)] 
Fix libpq memory leak during PQreset() --- closePGconn() was not
freeing all transient state of the PGconn object.

20 years agoMake libpq_gettext save and restore errno in a Windows-compatible way.
Tom Lane [Fri, 8 Jul 2005 15:25:19 +0000 (15:25 +0000)] 
Make libpq_gettext save and restore errno in a Windows-compatible way.
Also, back-patch fix into back branches.

20 years agoFix ancient memory leak in index_create(): RelationInitIndexAccessInfo
Tom Lane [Sat, 25 Jun 2005 16:54:12 +0000 (16:54 +0000)] 
Fix ancient memory leak in index_create(): RelationInitIndexAccessInfo
was being called twice in normal operation, leading to a leak of one set
of relcache subsidiary info.  Per report from Jeff Gold.

20 years agoCorrect some code in pg_restore when reading the header of a tar archive:
Neil Conway [Wed, 22 Jun 2005 02:12:19 +0000 (02:12 +0000)] 
Correct some code in pg_restore when reading the header of a tar archive:

(1) The code doesn't initialize `sum', so the initial "does the checksum
    match?" test is wrong.

(2) The loop that is intended to check for a "null block" just checks
    the first byte of the tar block 512 times, rather than each of the
    512 bytes one time (!), which I'm guessing was the intent.

It was only through sheer luck that this worked in the first place.

Per Coverity static analysis performed by EnterpriseDB.

20 years agoplpgsql's exec_assign_value() freed the old value of a variable before
Tom Lane [Mon, 20 Jun 2005 20:44:57 +0000 (20:44 +0000)] 
plpgsql's exec_assign_value() freed the old value of a variable before
copying/converting the new value, which meant that it failed badly on
"var := var" if var is of pass-by-reference type.  Fix this and a similar
hazard in exec_move_row(); not sure that the latter can manifest before
8.0, but patch it all the way back anyway.  Per report from Dave Chapeskie.

20 years agoWhen using C-string lookup keys in a dynahash.c hash table, use strncpy()
Tom Lane [Sat, 18 Jun 2005 20:51:59 +0000 (20:51 +0000)] 
When using C-string lookup keys in a dynahash.c hash table, use strncpy()
not memcpy() to copy the offered key into the hash table during HASH_ENTER.
This avoids possible core dump if the passed key is located very near the
end of memory.  Per report from Stefan Kaltenbrunner.

20 years agoTranslation updates
Peter Eisentraut [Fri, 17 Jun 2005 11:30:57 +0000 (11:30 +0000)] 
Translation updates

20 years agoThe random selection in function linear() could deliver a value equal to max
Tom Lane [Tue, 14 Jun 2005 14:21:31 +0000 (14:21 +0000)] 
The random selection in function linear() could deliver a value equal to max
if geqo_rand() returns exactly 1.0, resulting in failure due to indexing
off the end of the pool array.  Also, since this is using inexact float math,
it seems wise to guard against roundoff error producing values slightly
outside the expected range.  Per report from bug@zedware.org.

20 years agoFix bug in MIC -> EUC_JP conversion. Per Atsushi Ogawa.
Tatsuo Ishii [Sat, 11 Jun 2005 02:50:07 +0000 (02:50 +0000)] 
Fix bug in MIC -> EUC_JP conversion. Per Atsushi Ogawa.

20 years agoRepair error in description of nonblocking usage of PQgetCopyData().
Tom Lane [Thu, 9 Jun 2005 19:08:47 +0000 (19:08 +0000)] 
Repair error in description of nonblocking usage of PQgetCopyData().
Per Volkan Yazici.

20 years agoCode for SET/SHOW TIME ZONE with a fixed-interval timezone was not
Tom Lane [Sun, 5 Jun 2005 01:48:55 +0000 (01:48 +0000)] 
Code for SET/SHOW TIME ZONE with a fixed-interval timezone was not
prepared for HAVE_INT64_TIMESTAMP.  Per report from Guillaume Beaudoin.

20 years agoPush enable/disable of notify and catchup interrupts all the way down
Tom Lane [Thu, 2 Jun 2005 21:04:08 +0000 (21:04 +0000)] 
Push enable/disable of notify and catchup interrupts all the way down
to just around the bare recv() call that gets a command from the client.
The former placement in PostgresMain was unsafe because the intermediate
processing layers (especially SSL) use facilities such as malloc that are
not necessarily re-entrant.  Per report from counterstorm.com.

20 years agoFixed memory leak in ecpglib by adding some missing free() commands.
Michael Meskes [Thu, 2 Jun 2005 12:50:30 +0000 (12:50 +0000)] 
Fixed memory leak in ecpglib by adding some missing free() commands.

20 years agoPrevent to divide by zero and range out of 0..1
Teodor Sigaev [Wed, 1 Jun 2005 11:46:09 +0000 (11:46 +0000)] 
Prevent to divide by zero and range out of 0..1

20 years agoAdd test to WAL replay to verify that xl_prev points back to the previous
Tom Lane [Tue, 31 May 2005 19:10:57 +0000 (19:10 +0000)] 
Add test to WAL replay to verify that xl_prev points back to the previous
WAL record; this is necessary to be sure we recognize stale WAL records
when a WAL page was only partially written during a system crash.

20 years agoexpandRTE and get_rte_attribute_type mistakenly always imputed typmod -1
Tom Lane [Sun, 29 May 2005 17:10:52 +0000 (17:10 +0000)] 
expandRTE and get_rte_attribute_type mistakenly always imputed typmod -1
to columns of an RTE that was a function returning RECORD with a column
definition list.  Apparently no one has tried to use non-default typmod
with a function returning RECORD before.

20 years agoAdjust datetime parsing to be more robust. We now pass the length of the
Neil Conway [Thu, 26 May 2005 02:14:32 +0000 (02:14 +0000)] 
Adjust datetime parsing to be more robust. We now pass the length of the
working buffer into ParseDateTime() and reject too-long input there,
rather than checking the length of the input string before calling
ParseDateTime(). The old method was bogus because ParseDateTime() can use
a variable amount of working space, depending on the content of the
input string (e.g. how many fields need to be NUL terminated). This fixes
a minor stack overrun -- I don't _think_ it's exploitable, although I
won't claim to be an expert.

Along the way, fix a bug reported by Mark Dilger: the working buffer
allocated by interval_in() was too short, which resulted in rejecting
some perfectly valid interval input values. I added a regression test for
this fix.

20 years agoTranslation updates
Peter Eisentraut [Wed, 25 May 2005 08:32:14 +0000 (08:32 +0000)] 
Translation updates

20 years agoFix previous patch to exprTypmod.
Tatsuo Ishii [Wed, 25 May 2005 02:13:48 +0000 (02:13 +0000)] 
Fix previous patch to exprTypmod.

20 years agoInserting 5 characters into char(10) does not produce 5 padding spaces
Tatsuo Ishii [Tue, 24 May 2005 23:15:05 +0000 (23:15 +0000)] 
Inserting 5 characters into char(10) does not produce 5 padding spaces
if they are two-byte multibyte characters. Same thing can be happen
if octet_length(multibyte_chars) == n where n is char(n).
Long standing bug since 7.3 days. Per report and fix from Yoshiyuki Asaba.

20 years agoPrevious fix for "x FULL JOIN y ON true" failed to handle the case
Tom Lane [Tue, 24 May 2005 18:03:24 +0000 (18:03 +0000)] 
Previous fix for "x FULL JOIN y ON true" failed to handle the case
where there was also a WHERE-clause restriction that applied to the
join.  The check on restrictlist == NIL is really unnecessary anyway,
because select_mergejoin_clauses already checked for and complained
about any unmergejoinable join clauses.  So just take it out.

20 years agoGuard against duplicate IDs in input file in SortTocFromFile().
Tom Lane [Tue, 17 May 2005 17:30:53 +0000 (17:30 +0000)] 
Guard against duplicate IDs in input file in SortTocFromFile().
Per report from Brian Hackett.

20 years agoUpdate release notes for upcoming re-releases. REL7_4_8
Tom Lane [Mon, 9 May 2005 00:10:22 +0000 (00:10 +0000)] 
Update release notes for upcoming re-releases.

20 years agoUpdate release checklist to reflect that HISTORY and INSTALL don't
Tom Lane [Sun, 8 May 2005 23:34:32 +0000 (23:34 +0000)] 
Update release checklist to reflect that HISTORY and INSTALL don't
need to be created by hand anymore.

20 years agoIn Blob.getBytes(long position, int length) position is an offset
Kris Jurka [Sun, 8 May 2005 23:16:58 +0000 (23:16 +0000)] 
In Blob.getBytes(long position, int length) position is an offset
starting at 1, not zero as the driver was previously doing.

Thanks to Emmanuel Bernard for the report.

20 years agoRepair very-low-probability race condition between relation extension
Tom Lane [Sat, 7 May 2005 21:33:21 +0000 (21:33 +0000)] 
Repair very-low-probability race condition between relation extension
and VACUUM: in the interval between adding a new page to the relation
and formatting it, it was possible for VACUUM to come along and decide
it should format the page too.  Though not harmful in itself, this would
cause data loss if a third transaction were able to insert tuples into
the vacuumed page before the original extender got control back.

20 years agoAdjust time qual checking code so that we always check TransactionIdIsInProgress
Tom Lane [Sat, 7 May 2005 21:23:02 +0000 (21:23 +0000)] 
Adjust time qual checking code so that we always check TransactionIdIsInProgress
before we check commit/abort status.  Formerly this was done in some paths
but not all, with the result that a transaction might be considered
committed for some purposes before it became committed for others.
Per example found by Jan Wieck.

20 years agoStamp release 7.4.8.
Tom Lane [Thu, 5 May 2005 20:08:35 +0000 (20:08 +0000)] 
Stamp release 7.4.8.

20 years agoMake standalone backends ignore pg_database.datallowconn, so that there
Tom Lane [Thu, 5 May 2005 19:53:49 +0000 (19:53 +0000)] 
Make standalone backends ignore pg_database.datallowconn, so that there
is a way to recover from disabling connections to all databases at once.

20 years agoAdd WSACleanup() for Win32 socket cleanup.
Bruce Momjian [Thu, 5 May 2005 16:37:04 +0000 (16:37 +0000)] 
Add WSACleanup() for Win32 socket cleanup.

Backpatch to 7.4.X.

Jason Erickson

20 years agoAlter the signature for encoding conversion functions to declare the
Tom Lane [Tue, 3 May 2005 19:18:31 +0000 (19:18 +0000)] 
Alter the signature for encoding conversion functions to declare the
output area as INTERNAL not CSTRING.  This is to prevent people from
calling the functions by hand.  This is a permanent solution for the
back branches but I hope it is just a stopgap for HEAD.

20 years agoChange tsearch2 to not use the unsafe practice of creating functions
Tom Lane [Tue, 3 May 2005 16:51:45 +0000 (16:51 +0000)] 
Change tsearch2 to not use the unsafe practice of creating functions
that return INTERNAL without also having INTERNAL arguments.  Since the
functions in question aren't meant to be called by hand anyway, I just
redeclared them to take 'internal' instead of 'text'.  Also add code
to ProcedureCreate() to enforce the restriction, as I should have done
to start with :-(

20 years agoGCC 4.0 includes a new warning option, -Wformat-literal, that emits
Neil Conway [Sat, 30 Apr 2005 08:36:18 +0000 (08:36 +0000)] 
GCC 4.0 includes a new warning option, -Wformat-literal, that emits
a warning when a variable is used as a format string for printf()
and similar functions (if the variable is derived from untrusted
data, it could include unexpected formatting sequences). This
emits too many warnings to be enabled by default, but it does
flag a few dubious constructs in the Postgres tree. This patch
fixes up the obvious variants: functions that are passed a variable
format string but no additional arguments.

Most of these are harmless (e.g. the ruleutils stuff), but there
is at least one actual bug here: if you create a trigger named
"%sfoo", pg_dump will read uninitialized memory and fail to dump
the trigger correctly.

20 years agoThis patch fixes a bug in the error message emitted by pg_restore on an
Neil Conway [Sat, 30 Apr 2005 08:00:55 +0000 (08:00 +0000)] 
This patch fixes a bug in the error message emitted by pg_restore on an
incorrect -F argument: write_msg() expects its first parameter to be a
"module name", not the format string.

20 years agoRepair two TIME WITH TIME ZONE bugs found by Dennis Vshivkov. Comparison
Tom Lane [Sat, 23 Apr 2005 22:53:44 +0000 (22:53 +0000)] 
Repair two TIME WITH TIME ZONE bugs found by Dennis Vshivkov.  Comparison
of timetz values misbehaved in --enable-integer-datetime cases, and
EXTRACT(EPOCH) subtracted the zone instead of adding it in all cases.
Backpatch to all supported releases (except --enable-integer-datetime code
does not exist in 7.2).

20 years agoint_aggregate's int_enum() doesn't work correctly with arrays that
Tom Lane [Sat, 23 Apr 2005 05:39:01 +0000 (05:39 +0000)] 
int_aggregate's int_enum() doesn't work correctly with arrays that
aren't 1-D, so give an error message instead of failing.  Per report
from Ron Mayer.

20 years agoRelease build 216.
Kris Jurka [Fri, 22 Apr 2005 15:10:52 +0000 (15:10 +0000)] 
Release build 216.

20 years agoUpdatable ResultSets need to check for an empty ResultSet because
Kris Jurka [Fri, 22 Apr 2005 14:48:18 +0000 (14:48 +0000)] 
Updatable ResultSets need to check for an empty ResultSet because
isBeforeFirst and isAfterLast both return false for an empty result
so the checking to make sure the user is on a valid row wasn't
working.

Also don't allow an insert without specifying at least one column
value because INSERT INTO tab() values() is a syntax error.

20 years agoWhen moveToCurrentRow is called and the current row is off the
Kris Jurka [Fri, 22 Apr 2005 14:36:48 +0000 (14:36 +0000)] 
When moveToCurrentRow is called and the current row is off the
end of the ResultSet we can't try to load that row because it
doesn't exist and will throw an Exception.

Reported by Prasanth.

20 years agoDon't try to run clauseless index scans on index types that don't support
Tom Lane [Wed, 20 Apr 2005 21:48:22 +0000 (21:48 +0000)] 
Don't try to run clauseless index scans on index types that don't support
it.  Per report from Marinos Yannikos.

20 years agoFix mis-display of negative fractional seconds in interval values for
Tom Lane [Wed, 20 Apr 2005 17:15:09 +0000 (17:15 +0000)] 
Fix mis-display of negative fractional seconds in interval values for
--enable-integer-datetimes case.  Per report from Oliver Siegmar.

20 years agoAdd comment about permissions on pg_ts* tables
Teodor Sigaev [Tue, 19 Apr 2005 13:59:06 +0000 (13:59 +0000)] 
Add comment about permissions on pg_ts* tables

20 years agoWhen positioned before the start of a ResultSet issuing relative(0)
Kris Jurka [Mon, 18 Apr 2005 18:25:11 +0000 (18:25 +0000)] 
When positioned before the start of a ResultSet issuing relative(0)
results in an exception being thrown when it really should be a
no-op.

20 years agoDon't try to constant-fold functions returning RECORD, since the optimizer
Tom Lane [Thu, 14 Apr 2005 21:44:35 +0000 (21:44 +0000)] 
Don't try to constant-fold functions returning RECORD, since the optimizer
isn't presently set up to pass them an expected tuple descriptor.  Bug has
been there since 7.3 but was just recently reported by Thomas Hallgren.

20 years agoMake constant-folding produce sane output for COALESCE(NULL,NULL),
Tom Lane [Sun, 10 Apr 2005 20:58:03 +0000 (20:58 +0000)] 
Make constant-folding produce sane output for COALESCE(NULL,NULL),
that is a plain NULL and not a COALESCE with no inputs.  Fixes crash
reported by Michael Williamson.

20 years agoIn cost_mergejoin, the early-exit effect should not apply to the
Tom Lane [Mon, 4 Apr 2005 01:43:33 +0000 (01:43 +0000)] 
In cost_mergejoin, the early-exit effect should not apply to the
outer side of an outer join.  Per andrew@supernews.

20 years agoFlush any remaining statistics counts out to the collector at process
Tom Lane [Thu, 31 Mar 2005 23:21:32 +0000 (23:21 +0000)] 
Flush any remaining statistics counts out to the collector at process
exit.  Without this, operations triggered during backend exit (such as
temp table deletions) won't be counted ... which given heavy usage of
temp tables can lead to pg_autovacuum falling way behind on the need
to vacuum pg_class and pg_attribute.  Per reports from Steve Crawford
and others.

20 years agoFix various comparing functions
Teodor Sigaev [Thu, 31 Mar 2005 15:12:08 +0000 (15:12 +0000)] 
Fix various comparing functions

20 years agoPrevent to_char(interval) from dumping core on month-related formats
Tom Lane [Sat, 26 Mar 2005 00:42:21 +0000 (00:42 +0000)] 
Prevent to_char(interval) from dumping core on month-related formats
when a zero-month interval is given.  Per discussion with Karel.

20 years agoarray_map can't use the fn_extra field of the provided fcinfo struct as
Tom Lane [Thu, 24 Mar 2005 21:51:04 +0000 (21:51 +0000)] 
array_map can't use the fn_extra field of the provided fcinfo struct as
its private storage, because that belongs to the function that it is
supposed to call.  Per report from Ezequiel Tolnay.

20 years agoPrevious "64-bit fix" for intagg didn't actually work. This is already
Tom Lane [Wed, 23 Mar 2005 19:07:03 +0000 (19:07 +0000)] 
Previous "64-bit fix" for intagg didn't actually work.  This is already
fixed properly in CVS tip, but we need a band-aid for back branches.
Per report from Ron Mayer.

20 years agoFix ALTER DATABASE RENAME to allow the operation if user is a superuser
Tom Lane [Sat, 12 Mar 2005 21:12:18 +0000 (21:12 +0000)] 
Fix ALTER DATABASE RENAME to allow the operation if user is a superuser
who for some reason isn't marked usecreatedb.  Per report from Alexander
Pravking.  Also fix sloppy coding in have_createdb_privilege().

20 years agoSome builds (depends on crypto engine support?) of OpenSSL
Neil Conway [Sat, 12 Mar 2005 06:55:14 +0000 (06:55 +0000)] 
Some builds (depends on crypto engine support?) of OpenSSL
0.9.7x have EVP_DigestFinal function which which clears all of
EVP_MD_CTX.  This makes pgcrypto crash in functions which
re-use one digest context several times: hmac() and crypt()
with md5 algorithm.

Following patch fixes it by carring the digest info around
EVP_DigestFinal and re-initializing cipher.

Marko Kreen.

20 years agoPrevent rank change in case of duplicate search terms
Teodor Sigaev [Sat, 5 Mar 2005 16:19:33 +0000 (16:19 +0000)] 
Prevent rank change in case of duplicate search terms

20 years agoRelease proclock immediately in RemoveFromWaitQueue() if it represents
Tom Lane [Tue, 1 Mar 2005 21:15:26 +0000 (21:15 +0000)] 
Release proclock immediately in RemoveFromWaitQueue() if it represents
no held locks.  This maintains the invariant that proclocks are present
only for procs that are holding or awaiting a lock; when this is not
true, LockRelease will fail.  Per report from Stephen Clouse.

20 years agoDocument that only a table's owner may TRUNCATE it. Per Keith Worthington.
Tom Lane [Tue, 22 Feb 2005 19:06:49 +0000 (19:06 +0000)] 
Document that only a table's owner may TRUNCATE it.  Per Keith Worthington.

20 years agoEnsure that the resolved datatype of any unknown Param is propagated
Tom Lane [Sat, 19 Feb 2005 19:33:42 +0000 (19:33 +0000)] 
Ensure that the resolved datatype of any unknown Param is propagated
into the sub-SELECT targetlist when it appears in the context
INSERT INTO foo SELECT $1 ...  Per report from Abhijit Menon-Sen.

20 years agoALTER LANGUAGE RENAME has never worked. Per Sergey Yatskevich.
Tom Lane [Mon, 14 Feb 2005 06:18:09 +0000 (06:18 +0000)] 
ALTER LANGUAGE RENAME has never worked.  Per Sergey Yatskevich.

20 years agoBack-patch fix for a typo that unintentionally disabled backward scans
Tom Lane [Thu, 10 Feb 2005 20:37:15 +0000 (20:37 +0000)] 
Back-patch fix for a typo that unintentionally disabled backward scans
for all SPI-created cursors.

20 years agoIf we're gonna check for array overrun, we really should do so before
Tom Lane [Tue, 8 Feb 2005 18:22:11 +0000 (18:22 +0000)] 
If we're gonna check for array overrun, we really should do so before
overrunning the array, not after.

20 years agoPrevent 4 more buffer overruns in the PL/PgSQL parser. This is just a
Neil Conway [Mon, 7 Feb 2005 03:55:28 +0000 (03:55 +0000)] 
Prevent 4 more buffer overruns in the PL/PgSQL parser. This is just a
minimally-invasive fix for stable branches; a cleaner fix will be
committed to HEAD soon.

20 years agoRepair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS. Turns out
Tom Lane [Sun, 6 Feb 2005 20:19:42 +0000 (20:19 +0000)] 
Repair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS.  Turns out
there are corner cases involving dropping toasted columns in which the
previous coding would fail, too: the new version of the table might not
have any TOAST table, but we'd still propagate possibly-wide values of
dropped columns forward.

20 years agoBack-port heap_deformtuple() into 7.4 branch; needed for planned fix for
Tom Lane [Sun, 6 Feb 2005 20:15:32 +0000 (20:15 +0000)] 
Back-port heap_deformtuple() into 7.4 branch; needed for planned fix for
CLUSTER failure after ALTER TABLE SET WITHOUT OIDS.

20 years agoRecommend security@postgresql.org as the contact point for security-related bugs. REL7_4_7
Tom Lane [Sun, 30 Jan 2005 21:32:10 +0000 (21:32 +0000)] 
Recommend security@postgresql.org as the contact point for security-related bugs.

20 years agoStamp release 7.4.7.
Tom Lane [Sun, 30 Jan 2005 19:32:22 +0000 (19:32 +0000)] 
Stamp release 7.4.7.

20 years agoWe haven't had a fixed limit on rule recursion depth since 7.3 ...
Tom Lane [Sat, 29 Jan 2005 23:46:16 +0000 (23:46 +0000)] 
We haven't had a fixed limit on rule recursion depth since 7.3 ...
but the documentation still said so.

20 years agoMake sure contrib C functions are marked strict where needed.
Tom Lane [Sat, 29 Jan 2005 22:35:30 +0000 (22:35 +0000)] 
Make sure contrib C functions are marked strict where needed.
Kris Jurka

20 years agoCheck that aggregate creator has the right to execute the transition
Tom Lane [Thu, 27 Jan 2005 23:43:16 +0000 (23:43 +0000)] 
Check that aggregate creator has the right to execute the transition
functions of the aggregate, at both aggregate creation and execution times.

20 years agoNow that I look at it, int_array_enum() didn't work either.
Tom Lane [Thu, 27 Jan 2005 21:50:15 +0000 (21:50 +0000)] 
Now that I look at it, int_array_enum() didn't work either.

20 years agoFix security and 64-bit issues in contrib/intagg. This code could
Tom Lane [Thu, 27 Jan 2005 21:35:56 +0000 (21:35 +0000)] 
Fix security and 64-bit issues in contrib/intagg.  This code could
stand to be rewritten altogether, but for now just stick a finger in
the dike.

20 years agoBack-patch 8.0 version of plperl_hash_from_tuple() into prior releases
Tom Lane [Wed, 26 Jan 2005 17:09:21 +0000 (17:09 +0000)] 
Back-patch 8.0 version of plperl_hash_from_tuple() into prior releases
to fix failure to cope with quote marks in field values; not to mention
that it is shorter and faster.  Per report from Charles Haron.

20 years agoMark the text_soundex() function as "strict", to avoid crashing on NULL
Neil Conway [Wed, 26 Jan 2005 08:10:08 +0000 (08:10 +0000)] 
Mark the text_soundex() function as "strict", to avoid crashing on NULL
input. Also, may as well mark it "cacheable" as well. From Kris Jurka.

20 years agoDisallow LOAD to non-superusers. Per report from John Heasman.
Tom Lane [Mon, 24 Jan 2005 17:46:41 +0000 (17:46 +0000)] 
Disallow LOAD to non-superusers.  Per report from John Heasman.

20 years agoFix memory leak in rtdosplit, per report from Clive Page.
Tom Lane [Mon, 24 Jan 2005 02:48:15 +0000 (02:48 +0000)] 
Fix memory leak in rtdosplit, per report from Clive Page.

20 years agoThe result of a FULL or RIGHT join can't be assumed to be sorted by the
Tom Lane [Sun, 23 Jan 2005 02:23:30 +0000 (02:23 +0000)] 
The result of a FULL or RIGHT join can't be assumed to be sorted by the
left input's sorting, because null rows may be inserted at various points.
Per report from Ferenc Lutischá¸n.

20 years agoPrevent overrunning a heap-allocated buffer if more than 1024 parameters
Neil Conway [Fri, 21 Jan 2005 00:31:21 +0000 (00:31 +0000)] 
Prevent overrunning a heap-allocated buffer if more than 1024 parameters
to a refcursor declaration are specified. This is a minimally-invasive fix
for the buffer overrun -- a more thorough cleanup will be checked into
HEAD.

20 years agoFix mapping infinite timestamp values to arbitrary dates.
Kris Jurka [Thu, 13 Jan 2005 14:22:23 +0000 (14:22 +0000)] 
Fix mapping infinite timestamp values to arbitrary dates.
Report from Oliver Siegmar.

20 years agointerval_out failed to mention 'ago' for negative intervals in SQL and
Tom Lane [Tue, 11 Jan 2005 18:34:01 +0000 (18:34 +0000)] 
interval_out failed to mention 'ago' for negative intervals in SQL and
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.

20 years agoAvoid memory leakage during VACUUM FULL when an index expression or
Tom Lane [Thu, 23 Dec 2004 22:42:32 +0000 (22:42 +0000)] 
Avoid memory leakage during VACUUM FULL when an index expression or
index predicate uses temporary memory for evaluation.  Per example
from Jean-Gerard Pailloncy.

20 years agoMake array_cat more paranoid about checking datatypes in empty arrays.
Tom Lane [Fri, 17 Dec 2004 21:00:07 +0000 (21:00 +0000)] 
Make array_cat more paranoid about checking datatypes in empty arrays.

20 years agoarray_map failed to insert correct result type in an empty array.
Tom Lane [Fri, 17 Dec 2004 20:58:36 +0000 (20:58 +0000)] 
array_map failed to insert correct result type in an empty array.
Per example from Florian Pflug.

20 years agoAvoid generating excess (and illegal) parentheses around an aliased JOIN
Tom Lane [Mon, 13 Dec 2004 00:33:18 +0000 (00:33 +0000)] 
Avoid generating excess (and illegal) parentheses around an aliased JOIN
in prettyprint mode.  Andreas Pflug

20 years agoBack-patch copyOject fix for EXPLAIN/PREPARE.
Tom Lane [Mon, 13 Dec 2004 00:17:52 +0000 (00:17 +0000)] 
Back-patch copyOject fix for EXPLAIN/PREPARE.

20 years agoTranslation update
Peter Eisentraut [Sat, 11 Dec 2004 20:08:49 +0000 (20:08 +0000)] 
Translation update

20 years agoTranslation update
Peter Eisentraut [Sat, 11 Dec 2004 19:51:53 +0000 (19:51 +0000)] 
Translation update

20 years agoUse StrNCpy not strncpy to fill hash key, to ensure the resulting key
Tom Lane [Fri, 3 Dec 2004 21:26:52 +0000 (21:26 +0000)] 
Use StrNCpy not strncpy to fill hash key, to ensure the resulting key
is null-terminated.  I think this is not a real bug because the parser
would always have truncated the identifier to NAMEDATALEN-1 already,
but let's be safe.  Per report from Klocwork.

20 years agoTranslation fix by Julien Cristau
Peter Eisentraut [Fri, 3 Dec 2004 19:52:10 +0000 (19:52 +0000)] 
Translation fix by Julien Cristau

20 years agoTeach regex_fixed_prefix() the correct handling of advanced regex
Tom Lane [Thu, 2 Dec 2004 02:45:24 +0000 (02:45 +0000)] 
Teach regex_fixed_prefix() the correct handling of advanced regex
escapes --- they aren't simply quoted characters.  Problem noted by
Antti Salmela.  Also fix problem with incorrect handling of multibyte
characters when followed by a quantifier.

20 years agoFix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332.
Tom Lane [Wed, 1 Dec 2004 19:57:56 +0000 (19:57 +0000)] 
Fix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332.

20 years agoAvoid scribbling on original parsetree during DECLARE CURSOR. This
Tom Lane [Sun, 28 Nov 2004 22:16:49 +0000 (22:16 +0000)] 
Avoid scribbling on original parsetree during DECLARE CURSOR.  This
prevents problems when the DECLARE is in a portal and is executed
repeatedly, as is possible in v3 protocol.  Per analysis by Oliver
Jowett, though I didn't use his patch exactly.

20 years agoInstall Tcl regex fixes to sync our regex engine with Tcl 8.4.8 (up from
Tom Lane [Wed, 24 Nov 2004 22:57:09 +0000 (22:57 +0000)] 
Install Tcl regex fixes to sync our regex engine with Tcl 8.4.8 (up from
8.4.1).  This corrects some curious regex bugs, though not the greediness
issue I was hoping to find a solution for :-(

20 years agoOur interface code for Spencer's regexp package was checking for regexp
Tom Lane [Wed, 24 Nov 2004 22:44:27 +0000 (22:44 +0000)] 
Our interface code for Spencer's regexp package was checking for regexp
error conditions during regexp compile, but not during regexp execution;
any sort of "can't happen" errors would be treated as no-match instead
of being reported as they should be.  Noticed while trying to duplicate
a reported Tcl bug.

20 years agoBack-patch fix for ALTER DATABASE failing to flush pg_database changes
Tom Lane [Thu, 18 Nov 2004 01:19:40 +0000 (01:19 +0000)] 
Back-patch fix for ALTER DATABASE failing to flush pg_database changes
to disk right away.  This is just a one-liner change rather than trying
to use FlushRelationBuffers().

20 years agoFix off-by-one memory allocation, as reported by Rod Taylor. Also
Tom Lane [Wed, 17 Nov 2004 19:54:34 +0000 (19:54 +0000)] 
Fix off-by-one memory allocation, as reported by Rod Taylor.  Also
avoid repalloc'ing twice when once is sufficient.

20 years agoBackpatch fix from HEAD:
Neil Conway [Wed, 17 Nov 2004 00:18:26 +0000 (00:18 +0000)] 
Backpatch fix from HEAD:

Prevent a backend crash when processing CREATE TABLE commands with
more than 65K columns, or when the created table has more than 65K columns
due to adding inherited columns from parent relations. Fix a similar
crash when processing SELECT queries with more than 65K target list
entries. In all three cases we would eventually detect the error and
elog, but the check was being made too late.

20 years agoTranslation update
Peter Eisentraut [Tue, 16 Nov 2004 22:49:24 +0000 (22:49 +0000)] 
Translation update