summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-04-30GCC 4.0 includes a new warning option, -Wformat-literal, that emitsNeil Conway
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.
2005-04-30This patch fixes a bug in the error message emitted by pg_restore on anNeil Conway
incorrect -F argument: write_msg() expects its first parameter to be a "module name", not the format string.
2005-04-23Repair two TIME WITH TIME ZONE bugs found by Dennis Vshivkov. ComparisonTom Lane
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-22Release build 216.Kris Jurka
2005-04-22Updatable ResultSets need to check for an empty ResultSet becauseKris Jurka
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.
2005-04-22When moveToCurrentRow is called and the current row is off theKris Jurka
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.
2005-04-20Don't try to run clauseless index scans on index types that don't supportTom Lane
it. Per report from Marinos Yannikos.
2005-04-20Fix mis-display of negative fractional seconds in interval values forTom Lane
--enable-integer-datetimes case. Per report from Oliver Siegmar.
2005-04-18When positioned before the start of a ResultSet issuing relative(0)Kris Jurka
results in an exception being thrown when it really should be a no-op.
2005-04-14Don't try to constant-fold functions returning RECORD, since the optimizerTom Lane
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-10Make constant-folding produce sane output for COALESCE(NULL,NULL),Tom Lane
that is a plain NULL and not a COALESCE with no inputs. Fixes crash reported by Michael Williamson.
2005-04-04In cost_mergejoin, the early-exit effect should not apply to theTom Lane
outer side of an outer join. Per andrew@supernews.
2005-03-31Flush any remaining statistics counts out to the collector at processTom Lane
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.
2005-03-26Prevent to_char(interval) from dumping core on month-related formatsTom Lane
when a zero-month interval is given. Per discussion with Karel.
2005-03-24array_map can't use the fn_extra field of the provided fcinfo struct asTom Lane
its private storage, because that belongs to the function that it is supposed to call. Per report from Ezequiel Tolnay.
2005-03-12Fix ALTER DATABASE RENAME to allow the operation if user is a superuserTom Lane
who for some reason isn't marked usecreatedb. Per report from Alexander Pravking. Also fix sloppy coding in have_createdb_privilege().
2005-03-01Release proclock immediately in RemoveFromWaitQueue() if it representsTom Lane
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.
2005-02-19Ensure that the resolved datatype of any unknown Param is propagatedTom Lane
into the sub-SELECT targetlist when it appears in the context INSERT INTO foo SELECT $1 ... Per report from Abhijit Menon-Sen.
2005-02-14ALTER LANGUAGE RENAME has never worked. Per Sergey Yatskevich.Tom Lane
2005-02-10Back-patch fix for a typo that unintentionally disabled backward scansTom Lane
for all SPI-created cursors.
2005-02-08If we're gonna check for array overrun, we really should do so beforeTom Lane
overrunning the array, not after.
2005-02-07Prevent 4 more buffer overruns in the PL/PgSQL parser. This is just aNeil Conway
minimally-invasive fix for stable branches; a cleaner fix will be committed to HEAD soon.
2005-02-06Repair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS. Turns outTom Lane
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.
2005-02-06Back-port heap_deformtuple() into 7.4 branch; needed for planned fix forTom Lane
CLUSTER failure after ALTER TABLE SET WITHOUT OIDS.
2005-01-30Stamp release 7.4.7.Tom Lane
2005-01-27Check that aggregate creator has the right to execute the transitionTom Lane
functions of the aggregate, at both aggregate creation and execution times.
2005-01-26Back-patch 8.0 version of plperl_hash_from_tuple() into prior releasesTom Lane
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-24Disallow LOAD to non-superusers. Per report from John Heasman.Tom Lane
2005-01-24Fix memory leak in rtdosplit, per report from Clive Page.Tom Lane
2005-01-23The result of a FULL or RIGHT join can't be assumed to be sorted by theTom Lane
left input's sorting, because null rows may be inserted at various points. Per report from Ferenc Lutischá¸n.
2005-01-21Prevent overrunning a heap-allocated buffer if more than 1024 parametersNeil Conway
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.
2005-01-13Fix mapping infinite timestamp values to arbitrary dates.Kris Jurka
Report from Oliver Siegmar.
2005-01-11interval_out failed to mention 'ago' for negative intervals in SQL andTom Lane
GERMAN datestyles. Ancient bug reported by Terry Lee Tucker.
2004-12-23Avoid memory leakage during VACUUM FULL when an index expression orTom Lane
index predicate uses temporary memory for evaluation. Per example from Jean-Gerard Pailloncy.
2004-12-17Make array_cat more paranoid about checking datatypes in empty arrays.Tom Lane
2004-12-17array_map failed to insert correct result type in an empty array.Tom Lane
Per example from Florian Pflug.
2004-12-13Avoid generating excess (and illegal) parentheses around an aliased JOINTom Lane
in prettyprint mode. Andreas Pflug
2004-12-13Back-patch copyOject fix for EXPLAIN/PREPARE.Tom Lane
2004-12-11Translation updatePeter Eisentraut
2004-12-11Translation updatePeter Eisentraut
2004-12-03Use StrNCpy not strncpy to fill hash key, to ensure the resulting keyTom Lane
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-03Translation fix by Julien CristauPeter Eisentraut
2004-12-02Teach regex_fixed_prefix() the correct handling of advanced regexTom Lane
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-01Fix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332.Tom Lane
2004-11-28Avoid scribbling on original parsetree during DECLARE CURSOR. ThisTom Lane
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-24Install Tcl regex fixes to sync our regex engine with Tcl 8.4.8 (up fromTom Lane
8.4.1). This corrects some curious regex bugs, though not the greediness issue I was hoping to find a solution for :-(
2004-11-24Our interface code for Spencer's regexp package was checking for regexpTom Lane
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-18Back-patch fix for ALTER DATABASE failing to flush pg_database changesTom Lane
to disk right away. This is just a one-liner change rather than trying to use FlushRelationBuffers().
2004-11-17Fix off-by-one memory allocation, as reported by Rod Taylor. AlsoTom Lane
avoid repalloc'ing twice when once is sufficient.
2004-11-17Backpatch fix from HEAD:Neil Conway
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.