1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-17 06:41:24 +03:00

17060 Commits

Author SHA1 Message Date
Tom Lane
b6c56b73e7 Make array_cat more paranoid about checking datatypes in empty arrays. 2004-12-17 21:00:07 +00:00
Tom Lane
9ab182c2f1 array_map failed to insert correct result type in an empty array.
Per example from Florian Pflug.
2004-12-17 20:58:36 +00:00
Tom Lane
1d3ee97a3c Avoid generating excess (and illegal) parentheses around an aliased JOIN
in prettyprint mode.  Andreas Pflug
2004-12-13 00:33:18 +00:00
Tom Lane
92065453d7 Back-patch copyOject fix for EXPLAIN/PREPARE. 2004-12-13 00:17:52 +00:00
Peter Eisentraut
79c1011fb7 Translation update 2004-12-11 20:08:49 +00:00
Peter Eisentraut
b9f69d0241 Translation update 2004-12-11 19:51:53 +00:00
Tom Lane
de68155298 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.
2004-12-03 21:26:52 +00:00
Peter Eisentraut
8d424b3217 Translation fix by Julien Cristau 2004-12-03 19:52:10 +00:00
Tom Lane
6ba32b24b2 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.
2004-12-02 02:45:24 +00:00
Tom Lane
d237a12e49 Fix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332. 2004-12-01 19:57:56 +00:00
Tom Lane
0b9f48daf2 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.
2004-11-28 22:16:49 +00:00
Tom Lane
f5778c63e5 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 :-(
2004-11-24 22:57:09 +00:00
Tom Lane
38929bc06a 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.
2004-11-24 22:44:27 +00:00
Tom Lane
a007dd1d21 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:40 +00:00
Tom Lane
aed7855dd8 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:34 +00:00
Neil Conway
b990232c5d 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.
2004-11-17 00:18:26 +00:00
Peter Eisentraut
a2e1b146fe Translation update 2004-11-16 22:49:24 +00:00
Michael Meskes
143d152b1f List VALUE as a keyword. 2004-11-10 13:49:17 +00:00
Tom Lane
176bb0812f In PGSharedMemoryIsInUse, assume that EACCES indicates a shmem segment
that is of no concern to us --- it must belong to a different userid,
which means it is not a Postgres shmem segment (or at least,
not one that is relevant to our data directory).  I plan a more extensive
fix in HEAD, but this is a simple change that prevents failure-to-reboot
problems for single-postmaster installations.
2004-11-09 20:35:16 +00:00
Tom Lane
3392959b6e Fix unportable code in SockAddr_cidr_mask: you can't assume that
shifting left by full word width gives zero.  Per bug report from
Tyson Thomson.
2004-11-08 01:54:58 +00:00
Dave Cramer
5a57beccc3 fixed bug in REVOKE statement cat_str only has 8 arguments 2004-11-01 13:35:54 +00:00
Peter Eisentraut
5328b5ef6b New translations 2004-10-30 08:22:17 +00:00
Tom Lane
61fbe85985 Rearrange order of pre-commit operations: must close cursors before doing
ON COMMIT actions.  Per bug report from Michael Guerin.
2004-10-29 22:20:03 +00:00
Peter Eisentraut
c23f808eeb Translation update 2004-10-27 11:52:05 +00:00
Tom Lane
7447537803 Stamp release 7.4.6. REL7_4_6 2004-10-22 00:26:24 +00:00
Tom Lane
5b7e88dbe0 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:27 +00:00
Tom Lane
25d1755a29 Update obsolete comments about COPY vs INSERT options, per Uwe Schroeder. 2004-10-21 22:49:04 +00:00
Kris Jurka
d06384c6d7 Correctly cast the return value of a CallableStatement when getShort
is called.  getByte presents a can't happen situation as no function
can return a TINYINT because pg doesn't have an equivalent type.
Make this throw an exception if we get to this point.

Thanks to Christian Niles.
2004-10-21 19:13:55 +00:00
Tom Lane
62a6019c49 Back-patch make_oidjoins_check security improvement. 2004-10-21 17:12:19 +00:00
Tom Lane
2d46f0e613 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:03 +00:00
Peter Eisentraut
2dc3a1d2a7 Translation update 2004-10-12 17:54:24 +00:00
Michael Meskes
3ff8e83231 '::' is no longer interpreted as a variable in a prepare statement. 2004-10-05 10:48:45 +00:00
Tom Lane
0ed57c310c Convert pg_stat_get_backend_idset to use the existing SRF support.
This seems the cleanest way of fixing its lack of a shutdown callback,
which was preventing it from working correctly in a query that didn't
run it to completion.  Per bug report from Szima GÄbor.
2004-10-01 21:09:46 +00:00
Peter Eisentraut
d31f9c5f36 Translation update 2004-09-27 20:27:58 +00:00
Tom Lane
c86cc37f62 Repair bug that would allow libpq to think a command had succeeded when
it really hadn't, due to double output of previous command's response.
Fix prevents recursive entry to libpq routines.  Found by Jan Wieck.
2004-09-26 00:26:56 +00:00
Peter Eisentraut
14946a80c0 Translation update 2004-09-20 08:15:05 +00:00
Peter Eisentraut
f0183634d6 Translation update 2004-09-20 08:07:15 +00:00
Tom Lane
66343dde64 Put the brackets in the right places in timestamp entries in table 8-1.
Spotted by Josh Purinton.
2004-09-18 15:28:16 +00:00
Tom Lane
f44a64901e Fix memory leak in tokenize_file, per report from Vadim Passynkov. 2004-09-18 01:23:12 +00:00
Tom Lane
50ff806700 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:10 +00:00
Peter Eisentraut
9a22b6fb59 Translation update 2004-09-13 20:51:22 +00:00
Kris Jurka
c65066a190 Protected access to variable m_preparedCount via synchronized
function to prevent multiple threads using automatic cursors on
the same connection from stomping over each others cursor.

Originally Jan Wieck, re-reported by Jack Orenstein after
accidental removal.
2004-09-13 08:02:41 +00:00
Kris Jurka
5e8046cbc9 ResultSet.moveToCurrentRow was checking the cached updateability flag
assuming it had been set instead of correctly calling the
isUpdateable() method which sets the flag if needed.  This usually
worked because moveToCurrentRow is only useful after a
moveToInsertRow call which would set the flag, but this is not
required.

David Bucciarelli
2004-09-13 07:14:26 +00:00
Neil Conway
6090b70ace Due to popular domand, backport fix for a typo in the SELECT reference
page, per Thomas F. O'Connell.
2004-09-13 01:59:35 +00:00
Tom Lane
63398a0381 Fix bogus example for bit-string XOR (already fixed in HEAD).
Per Grzegorz Wojdyla.
2004-09-11 16:15:26 +00:00
Tom Lane
097597578e Back-patch fix to disallow BEGIN/COMMIT/ROLLBACK inside SQL functions.
Not sure why this isn't causing serious problems in some simple tests,
but it definitely isn't going to do anything desirable...
2004-09-06 18:23:09 +00:00
Tom Lane
aa1c232be7 Repair 'expected both swapped tables to have TOAST tables' bug in 7.4
branch.  I wasn't excited about doing this when the first report came in,
but now that we have two of 'em, I suppose it had better get fixed.
2004-08-31 23:16:36 +00:00
Bruce Momjian
4d608ac197 Prevent pg_ctl restart from adding -D datadir multiple times. 2004-08-28 21:10:00 +00:00
Tom Lane
288e0404b8 Make gistindex_keytest safe against NULL values. Same fix was already
made in passing for 8.0, but now that we have a bug report showing it's
needed, we should put it into 7.4 branch.
2004-08-27 17:47:56 +00:00
Peter Eisentraut
0d719d0b04 Translation update 2004-08-24 21:45:13 +00:00