summaryrefslogtreecommitdiff
path: root/src/backend/commands
AgeCommit message (Collapse)Author
2003-10-18Simplify loop test to avoid bug in AIX compiler, per Andreas.Tom Lane
2003-10-17Adjust display of actual runtimes in EXPLAIN output to use three fractionalTom Lane
digits, and label it 'ms' not 'msec', for consistency with psql's \timing display. Per recent discussions.
2003-10-16Fix bad interaction between NOTIFY processing and V3 extended queryTom Lane
protocol, per report from Igor Shevchenko. NOTIFY thought it could do its thing if transaction blockState is TBLOCK_DEFAULT, but in reality it had better check the low-level transaction state is TRANS_DEFAULT as well. Formerly it was not possible to wait for the client in a state where the first is true and the second is not ... but now we can have such a state. Minor cleanup in StartTransaction() as well.
2003-10-13Back out makeNode() patch to fix gcc 3.3.1 warning.Bruce Momjian
2003-10-13Adjust setRelhassubclassInRelation() to not perform actual heap_updateTom Lane
when the pg_class.relhassubclass value is already correct. This should avoid most cases of the 'tuple concurrently updated' problem that Robert Creager recently complained about. Also remove a bunch of dead code in StoreCatalogInheritance() --- it was still computing the complete list of direct and indirect inheritance ancestors, though that list has not been needed since we got rid of the pg_ipl catalog.
2003-10-12Use makeNode() to allocate structures that have to be cast to Node *,Bruce Momjian
rather than allocating them on the stack. Fixes complaint from gcc 3.3.1.
2003-10-11Back out -fstrict-aliasing void* casting.Bruce Momjian
2003-10-11This patch will stop gcc from issuing warnings about type-punned objectsBruce Momjian
when -fstrict-aliasing is turned on, as it is in the latest gcc when you use -O2 Andrew Dunstan
2003-10-06During ALTER TABLE ADD FOREIGN KEY, try to check the existing rows usingTom Lane
a single LEFT JOIN query instead of firing the check trigger for each row individually. Stephan Szabo, with some kibitzing from Tom Lane and Jan Wieck.
2003-10-06Modify COPY FROM to match the null-value string against the column valueTom Lane
before it is de-backslashed, not after. This allows the null string \N to be reliably distinguished from the data value \N (which must be represented as \\N). Per bug report from Manfred Koizar ... but it's amazing this hasn't been reported before ... Also, be consistent about encoding conversion for null string: the form specified in the command is in the server encoding, but what is sent to/from client must be in client encoding. This never worked quite right before either.
2003-10-02Add a bit more locking to vac_update_relstats and vac_update_dbstatsTom Lane
to make them comparable to what UpdateStats does in the same situation. I'm not certain two instances of vac_update_relstats could run in parallel for the same relation, but parallel invocations of vac_update_dbstats do seem possible.
2003-10-02String fixes/improvements found by Alvaro HerreraPeter Eisentraut
2003-10-02Change some notices to warnings and vice versa according to criteriaPeter Eisentraut
developed on -hackers.
2003-10-01Repair RI trigger visibility problems (this time for sure ;-)) per recentTom Lane
discussion on pgsql-hackers: in READ COMMITTED mode we just have to force a QuerySnapshot update in the trigger, but in SERIALIZABLE mode we have to run the scan under a current snapshot and then complain if any rows would be updated/deleted that are not visible in the transaction snapshot.
2003-09-29Improve context display for failures during COPY IN, as recentlyTom Lane
discussed on pghackers.
2003-09-29Eliminate another gratuitous message wording difference.Peter Eisentraut
2003-09-29More message editing, some suggested by Alvaro HerreraPeter Eisentraut
2003-09-26Various message fixes, among those fixes for the previous round of fixesPeter Eisentraut
2003-09-25Get rid of ReferentialIntegritySnapshotOverride by extending Executor APITom Lane
to allow es_snapshot to be set to SnapshotNow rather than a query snapshot. This solves a bug reported by Wade Klaver, wherein triggers fired as a result of RI cascade updates could misbehave.
2003-09-25Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
2003-09-24Repair some REINDEX problems per recent discussions. The relcache isTom Lane
now able to cope with assigning new relfilenode values to nailed-in-cache indexes, so they can be reindexed using the fully crash-safe method. This leaves only shared system indexes as special cases. Remove the 'index deactivation' code, since it provides no useful protection in the shared- index case. Require reindexing of shared indexes to be done in standalone mode, but remove other restrictions on REINDEX. -P (IgnoreSystemIndexes) now prevents using indexes for lookups, but does not disable index updates. It is therefore safe to allow from PGOPTIONS. Upshot: reindexing system catalogs can be done without a standalone backend for all cases except shared catalogs.
2003-09-23Putting back the previous change must be the first thing.Hiroshi Inoue
ALso put back a #ifndef ENABLE_REINDEX_NAILED_RELATIONS which was removed about a year ago.
2003-09-19Disallow foreign-key references from temp tables to permanent tables.Tom Lane
Per recent discussion, this does not work because other backends can't reliably see tuples in a temp table and so cannot run the RI checks correctly. Seems better to disallow this case than go back to accessing temp tables through shared buffers. Also, disallow FK references to ON COMMIT DELETE ROWS tables. We already caught this problem for normal TRUNCATE, but the path used by ON COMMIT didn't check.
2003-09-19Seems like a bad idea that REINDEX TABLE supports (or thinks it does)Tom Lane
reindexing system tables without ignoring system indexes, when the other two varieties of REINDEX disallow it. Make all three act the same, and simplify downstream code accordingly.
2003-09-15Fix LISTEN/NOTIFY race condition reported by Gavin Sherry. While aTom Lane
really general fix might be difficult, I believe the only case where AtCommit_Notify could see an uncommitted tuple is where the other guy has just unlistened and not yet committed. The best solution seems to be to just skip updating that tuple, on the assumption that the other guy does not want to hear about the notification anyway. This is not perfect --- if the other guy rolls back his unlisten instead of committing, then he really should have gotten this notify. But to do that, we'd have to wait to see if he commits or not, or make UNLISTEN hold exclusive lock on pg_listener until commit. Either of these answers is deadlock-prone, not to mention horrible for interactive performance. Do it this way for now. (What happened to that project to do LISTEN/NOTIFY in memory with no table, anyway?)
2003-09-15Remove warnings for operations that have no effect when executed repeatedly.Peter Eisentraut
2003-09-11Message in the other exit from acquire_sample_rows(), as per updateTom Lane
from Mark Kirkwood. Also show the sample size.
2003-09-11Try to make recently-added analyze log message look something likeTom Lane
the others in style.
2003-09-11Fix missed message update, per Alvaro Herrera.Tom Lane
2003-09-10Improve error message for cp or rm failur during create/drop database,Tom Lane
per recent discussions.
2003-09-10Add HINT if CREATE FUNCTION specifies a valid language, but the languageBruce Momjian
isn't loaded into the database.
2003-09-09Some "feature not supported" errors are better syntax errors, because thePeter Eisentraut
feature they complain about isn't a feature or cannot be implemented without definitional changes.
2003-08-30Guard against pgindent changing =- to = -.Bruce Momjian
2003-08-28Fix stupid typo (mine I suppose) in CopyGetData. Per report from Dave Cramer.Tom Lane
2003-08-26Attached is a (very small) patch to make analyze display someBruce Momjian
interesting info in verbose mode about the analyzed relation (pages, rows per block and rows). Mark Kirkwood
2003-08-24Change warnings for non-existing or pre-existing cursors to errors.Peter Eisentraut
2003-08-17Create a 'type cache' that keeps track of the data needed for any particularTom Lane
datatype by array_eq and array_cmp; use this to solve problems with memory leaks in array indexing support. The parser's equality_oper and ordering_oper routines also use the cache. Change the operator search algorithms to look for appropriate btree or hash index opclasses, instead of assuming operators named '<' or '=' have the right semantics. (ORDER BY ASC/DESC now also look at opclasses, instead of assuming '<' and '>' are the right things.) Add several more index opclasses so that there is no regression in functionality for base datatypes. initdb forced due to catalog additions.
2003-08-13libpq failed to cope with COPY FROM STDIN if the command was issuedTom Lane
via extended query protocol, because it sends Sync right after Execute without realizing that the command to be executed is COPY. There seems to be no reasonable way for it to realize that, either, so the best fix seems to be to make the backend ignore Sync during copy-in mode. Bit of a wart on the protocol, but little alternative. Also, libpq must send another Sync after terminating the COPY, if the command was issued via Execute.
2003-08-11Code cleanup inspired by recent resname bug report (doesn't fix the bugTom Lane
yet, though). Avoid using nth() to fetch tlist entries; provide a common routine get_tle_by_resno() to search a tlist for a particular resno. This replaces a couple uses of nth() and a dozen hand-coded search loops. Also, replace a few uses of nth(length-1, list) with llast().
2003-08-08Another pgindent run with updated typedefs.Bruce Momjian
2003-08-06Rename fields of DestReceiver to avoid collisions with (ill-considered)Tom Lane
macros in some platforms' sys/socket.h.
2003-08-04Fix some copyright notices that weren't updated. Improve copyright toolTom Lane
so it won't miss 'em again.
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-08-01Make ecpg SQLSTATE-aware. Map existing SQLCODE assignments to SQLSTATEs,Peter Eisentraut
rather than parsing the message. Add some documentation about embedded SQL.
2003-08-01Adjust 'permission denied' messages to be more useful and consistent.Tom Lane
2003-07-29Apply (a somewhat revised version of) Greg Mullane's patch to eliminateTom Lane
heuristic determination of day vs month in date/time input. Add the ability to specify that input is interpreted as yy-mm-dd order (which formerly worked, but only for yy greater than 31). DateStyle's input component now has the preferred spellings DMY, MDY, or YMD; the older keywords European and US are now aliases for the first two of these. Per recent discussions on pgsql-general.
2003-07-28A visit from the message-style police ...Tom Lane
2003-07-22Error message editing in backend/libpq, backend/postmaster, backend/tcop.Tom Lane
Along the way, fix some logic problems in pgstat_initstats, notably the bogus assumption that malloc returns zeroed memory.
2003-07-21Error message editing in backend/executor.Tom Lane