1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-03 01:21:48 +03:00

14420 Commits

Author SHA1 Message Date
Tom Lane
5d0d60efe6 Make standalone backends ignore pg_database.datallowconn, so that there
is a way to recover from disabling connections to all databases at once.
2005-05-05 19:54:01 +00:00
Tom Lane
ecbc6dd3e9 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.
2005-05-03 19:18:48 +00:00
Neil Conway
0d8cdcfe88 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.

This patch fixes a bug in pg_dump (triggers with formatting sequences
in their names are not dumped correctly) and some related pg_dump
code that looks dubious; cleanups for more harmless instances have
been applied to more recent branches.
2005-04-30 08:42:17 +00:00
Neil Conway
8f54b05551 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.
2005-04-30 08:01:29 +00:00
Tom Lane
2cfb3b6d4d 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).
2005-04-23 22:54:03 +00:00
Tom Lane
ca1e578d62 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.
2005-04-23 05:39:19 +00:00
Tom Lane
daa7e6604c Don't try to run clauseless index scans on index types that don't support
it.  Per report from Marinos Yannikos.
2005-04-20 21:48:31 +00:00
Tom Lane
7735c39aa0 Fix mis-display of negative fractional seconds in interval values for
--enable-integer-datetimes case.  Per report from Oliver Siegmar.
2005-04-20 17:15:19 +00:00
Tom Lane
aa4762e7c8 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.
2005-04-14 21:44:46 +00:00
Tom Lane
536b3af7e3 Prevent to_char(interval) from dumping core on month-related formats
when a zero-month interval is given.  Per discussion with Karel.
2005-03-26 00:42:44 +00:00
Tom Lane
ce49ae9041 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.
2005-03-23 19:07:18 +00:00
Neil Conway
acb42e9cb9 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.
2005-03-13 23:45:56 +00:00
Neil Conway
638eb4938c Update contrib/pgcrypto in 7.3 and 7.2 branches to avoid problems with
recent versions of OpenSSL. From Marko Kreen.
2005-03-13 23:41:44 +00:00
Tom Lane
013d778e32 Back-patch Neil's four additional buffer overrun checks. 2005-02-08 18:22:45 +00:00
Tom Lane
d40cda00f5 Recommend security@postgresql.org as the contact point for security-related bugs. REL7_3_9 2005-01-30 21:32:20 +00:00
Tom Lane
7929303d61 Stamp release 7.3.9. 2005-01-30 20:08:15 +00:00
Tom Lane
24162978b7 Make sure contrib C functions are marked strict where needed.
Kris Jurka
2005-01-29 22:35:53 +00:00
Tom Lane
1263d7b8d1 Check that aggregate creator has the right to execute the transition
functions of the aggregate, at both aggregate creation and execution times.
2005-01-27 23:43:45 +00:00
Tom Lane
64e3271ebc Now that I look at it, int_array_enum() didn't work either. 2005-01-27 21:50:23 +00:00
Tom Lane
05dadca2a0 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.
2005-01-27 21:36:10 +00:00
Neil Conway
5036a19f68 Backpatch fix for buffer overrun in parsing refcursor parameters to
REL7_3_STABLE.
2005-01-27 01:44:42 +00:00
Tom Lane
483fa35176 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.
2005-01-26 17:09:28 +00:00
Neil Conway
38ab95f703 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.
2005-01-26 08:20:40 +00:00
Tom Lane
a23133a4d7 Disallow LOAD to non-superusers. Per report from John Heasman. 2005-01-24 17:46:49 +00:00
Tom Lane
48a1dc0d5c 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.
2005-01-23 02:24:30 +00:00
Tom Lane
76f13fe78d interval_out failed to mention 'ago' for negative intervals in SQL and
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.
2005-01-11 18:34:29 +00:00
Tom Lane
e333705b84 array_map failed to insert correct result type in an empty array.
Per example from Florian Pflug.
2004-12-17 20:58:47 +00:00
Tom Lane
bd677bb443 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().
2004-11-18 01:19:57 +00:00
Tom Lane
eac07f1fd7 Fix off-by-one memory allocation, as reported by Rod Taylor. Also
avoid repalloc'ing twice when once is sufficient.
2004-11-17 19:54:53 +00:00
Tom Lane
42a8068b5c Stamp release 7.3.8. REL7_3_8 2004-10-22 00:27:05 +00:00
Tom Lane
0b83c1f272 Prevent pg_ctl from being run as root. Since it uses configuration files
owned by postgres, doing "pg_ctl start" as root could allow a privilege
escalation attack, as pointed out by iDEFENSE.  Of course the postmaster would
fail, but we ought to fail a little sooner to protect sysadmins unfamiliar
with Postgres.  The chosen fix is to disable root use of pg_ctl in all cases,
just to be confident there are no other holes.
2004-10-22 00:24:33 +00:00
Tom Lane
d9c1e5e1c2 Back-patch make_oidjoins_check security improvement. 2004-10-21 17:12:27 +00:00
Tom Lane
78c0692b15 Repair possible failure to update hint bits back to disk, per
http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php.
I plan a more permanent fix in HEAD, but for the back branches it seems
best to just touch the places that actually have a problem.
2004-10-13 22:22:22 +00:00
Tom Lane
8a9b331c32 Fix breakage in hashjoin from recent backpatch of left-join bug fix.
(That's what I get for not testing the back branches *before* committing.)
2004-10-13 21:56:06 +00:00
Tom Lane
c57bcb7b2c Hashed LEFT JOIN would miss outer tuples with no inner match if the join
was large enough to be batched and the tuples fell into a batch where
there were no inner tuples at all.  Thanks to Xiaoyu Wang for finding a
test case that exposed this long-standing bug.
2004-09-17 18:29:24 +00:00
Tom Lane
1cfe0a407d Wups, seem to have used an ungood version of lynx to generate this. REL7_3_7 2004-08-15 01:27:47 +00:00
Tom Lane
1bc489bc9c Stamp 7.3.7. 2004-08-15 00:52:02 +00:00
Tom Lane
25ad99245a Fix failure to guarantee that a checkpoint will write out pg_clog updates
for transaction commits that occurred just before the checkpoint.  This is
an EXTREMELY serious bug --- kudos to Satoshi Okada for creating a
reproducible test case to prove its existence.
2004-08-11 04:08:40 +00:00
Teodor Sigaev
144dc30554 Remove asymetrical word processing in query and text 2004-06-07 16:49:25 +00:00
Peter Eisentraut
6122f38b0a Translation updates 2004-04-05 09:02:37 +00:00
Peter Eisentraut
6f8f414d30 Translation updates 2004-04-05 08:45:37 +00:00
Tom Lane
e921472fef Always schema-qualify the name of a function referenced in CREATE CAST.
The former coding failed if the cast function was not in the pg_catalog
schema.  How'd this escape detection?
2004-03-02 21:15:15 +00:00
Tom Lane
2d558b2baa Brand 7.3.6. REL7_3_6 2004-03-02 00:44:55 +00:00
Tom Lane
040f11db24 Update release notes for 7.3.6. 2004-03-02 00:39:09 +00:00
Tom Lane
d367707827 Replace unportable use of /dev/stdin with lynx's -stdin switch. 2004-03-02 00:03:15 +00:00
Joe Conway
a7e5e2fe74 When returning type "record", replace use of pgresultGetTupleDesc
with ReturnSetInfo->expectedDesc. This allows custom datatypes
(e.g. from tsearch2) to be returned at runtime. Previous behavior
depended on the type oid to match between the remote and local
database, which obviously doesn't work well for custom types.
Per report from Mark Gibson.
2004-02-24 06:07:52 +00:00
Joe Conway
7ce7e3f036 pply quote_literal to the start_with argument of connectby. Fixes problem
reported by David Garamond when working with bytea parent and child keys.
2004-02-24 05:26:27 +00:00
Tom Lane
d301dcbe30 Don't crash when a rowtype argument to a plpgsql function is NULL.
Per report from Chris Campbell.
2004-02-24 01:44:58 +00:00
Tom Lane
8fd0eb8c7a Back-patch fix for ReadOffset with off_t wider than int. 2004-02-05 22:12:48 +00:00
Tom Lane
3c373885fa Do not let external specification of CFLAGS stop us from adding
-fno-strict-aliasing.
2004-02-02 04:08:12 +00:00