1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-15 05:46:52 +03:00
Commit Graph

12356 Commits

Author SHA1 Message Date
Tom Lane
7447537803 Stamp release 7.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
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
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
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
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
Tom Lane
0bdacf50f1 Brand 7.4.5 ... now that was our shortest-lived release ever ... 2004-08-18 03:11:25 +00:00
Tom Lane
ba9b9a6e62 Fix bug introduced into _bt_getstackbuf() on 2003-Feb-21: the initial
value of 'start' could be past the end of the page, if the page was
split by some concurrent inserting process since we visited it.  In
this situation the code could look at bogus entries and possibly find
a match (since after all those entries still contain what they had
before the split).  This would lead to 'specified item offset is too large'
followed by 'PANIC: failed to add item to the page', as reported by Joe
Conway for scenarios involving heavy concurrent insertion activity.
2004-08-17 23:16:07 +00:00
Tom Lane
17663e1aeb Stamp 7.4.4. 2004-08-15 00:24:04 +00:00
Tom Lane
d9dda2d737 Back-patch fix for \r\n line endings in psql's COPY support.
Andrew Dunstan.
2004-08-14 22:24:49 +00:00
Peter Eisentraut
b2280a5de9 Translation update 2004-08-14 19:14:28 +00:00
Peter Eisentraut
0caa398ee7 Translation update 2004-08-13 16:42:51 +00:00
Kris Jurka
c595a438bc New build for the 7.4.4 release. 2004-08-13 05:18:45 +00:00
Tom Lane
43775d3de0 Avoid crashing when restoring a saved GUC session_authorization value
that refers to a now-deleted userid.  Per gripe from Chris Ochs.
2004-08-11 21:10:52 +00:00
Kris Jurka
8120dc536a Decode V3 notice messages instead of leaving them in raw form.
From Donald Fraser.
2004-08-11 06:56:00 +00:00
Kris Jurka
af8e9a44fe DatabaseMetaData.getSearchString escape was a \ short of working
because both Java's String constructor and pg's input parser strip
off backslashes.
2004-08-11 06:40:16 +00:00
Tom Lane
d508e0ddd2 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:02 +00:00
Peter Eisentraut
e2a994be73 Translation update 2004-08-10 18:37:53 +00:00
Peter Eisentraut
3306cdfe08 Change declared encoding 2004-07-25 11:49:20 +00:00
Peter Eisentraut
22bfb343d6 New translation 2004-07-25 11:44:57 +00:00
Michael Meskes
a7d68b42f0 Fixed handling of cyclic defines. 2004-07-20 18:22:53 +00:00
Tom Lane
ab50cb14a4 Fix incorrect tracking of session authorization in the presence of ACLs
that contain rights granted by non-owners.  Per bug report from
Nishad Prakash.
2004-07-19 21:02:42 +00:00
Tom Lane
3998d0fdca When renaming a column that participates in a foreign key, we must
force relcache rebuild for the other table as well as the column's
own table.  Otherwise, already-cached foreign key triggers will stop
working.  Per example from Alexander Pravking.
2004-07-17 17:28:47 +00:00
Kris Jurka
7b2c575d4e When retrieving an array of numerics it attempted to set the scale on
the retrieved data to zero, which doesn't work for non-integer values.

Oliver Dauben
2004-07-15 10:00:20 +00:00
Tom Lane
54affc0921 Test HAVING condition before computing targetlist of an Aggregate node.
This is required by SQL spec to avoid failures in cases like
  SELECT sum(win)/sum(lose) FROM ... GROUP BY ... HAVING sum(lose) > 0;
AFAICT we have gotten this wrong since day one.  Kudos to Holger Jakobs
for being the first to notice.
2004-07-10 18:39:44 +00:00
Bruce Momjian
56442e9fab OK, another try at Darwin threads. 2004-07-08 18:25:22 +00:00
Bruce Momjian
2ba666ef01 Remove OSX thread flags. No consistent report. 2004-07-08 16:27:58 +00:00
Bruce Momjian
d5bf36f606 Add OSX thread support for next 7.4.X 2004-07-07 13:04:48 +00:00
Tom Lane
abef61155d Fix broken logic for pretty-printing parenthesis-suppression in UNION
et al.
2004-07-06 04:50:54 +00:00
Michael Meskes
e5a806bb29 Added free() calls against memory leak in interval.c. 2004-07-05 18:54:01 +00:00
Peter Eisentraut
4a9468bf29 Translation update 2004-07-02 15:02:29 +00:00
Michael Meskes
a3c695d0c2 - Only use typedefs inside their scope.
- Variables that are out of scope, were not removed all the time.
- Make a varchar NULL set everything to 0 when not using indicators.
2004-06-27 12:32:47 +00:00
Kris Jurka
46f2ee852b Fix apparently harmless typo. {$srcdir} -> ${srcdir}
Markus Schaber
2004-06-24 09:51:44 +00:00
Kris Jurka
15a932c50f Close the existing socket connection when reverting to the V2
protocol, or encountering other connection failures.

Laurent Sylvain
2004-06-22 09:37:03 +00:00
Kris Jurka
bb95de1f2a Fix some problems with result sets positioned before the start or
after the end of results.  You could still call a number of methods
on them like getXXX, updateXXX, and updateRow().
2004-06-21 03:12:01 +00:00