aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
Commit message (Collapse)AuthorAge
* Fix ALTER DATABASE RENAME to allow the operation if user is a superuserTom Lane2005-03-12
| | | | | who for some reason isn't marked usecreatedb. Per report from Alexander Pravking. Also fix sloppy coding in have_createdb_privilege().
* ALTER LANGUAGE RENAME has never worked. Per Sergey Yatskevich.Tom Lane2005-02-14
|
* Repair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS. Turns outTom Lane2005-02-06
| | | | | | | 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.
* Avoid memory leakage during VACUUM FULL when an index expression orTom Lane2004-12-23
| | | | | index predicate uses temporary memory for evaluation. Per example from Jean-Gerard Pailloncy.
* Back-patch copyOject fix for EXPLAIN/PREPARE.Tom Lane2004-12-13
|
* Use StrNCpy not strncpy to fill hash key, to ensure the resulting keyTom Lane2004-12-03
| | | | | | 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.
* Avoid scribbling on original parsetree during DECLARE CURSOR. ThisTom Lane2004-11-28
| | | | | | 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.
* Back-patch fix for ALTER DATABASE failing to flush pg_database changesTom Lane2004-11-18
| | | | | to disk right away. This is just a one-liner change rather than trying to use FlushRelationBuffers().
* Backpatch fix from HEAD:Neil Conway2004-11-17
| | | | | | | | | 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.
* Repair 'expected both swapped tables to have TOAST tables' bug in 7.4Tom Lane2004-08-31
| | | | | 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.
* Avoid crashing when restoring a saved GUC session_authorization valueTom Lane2004-08-11
| | | | that refers to a now-deleted userid. Per gripe from Chris Ochs.
* When renaming a column that participates in a foreign key, we mustTom Lane2004-07-17
| | | | | | 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.
* Reduce pg_listener lock taken by NOTIFY et al from AccessExclusiveLockTom Lane2004-05-22
| | | | | | to ExclusiveLock. This still serializes the operations of this module, but doesn't conflict with concurrent ANALYZE operations. Per trouble report from Philip Warner a few weeks ago.
* ALTER SEQUENCE RESTART did the wrong thing if sequence last_value wasTom Lane2004-04-06
| | | | | equal to the desired restart value (must clear is_called, did not). Per bug report #1127 from Piotr Konieczny.
* Implement a solution to the 'Turkish locale downcases I incorrectly'Tom Lane2004-02-21
| | | | | | problem, per previous discussion. Make some additional changes to centralize the knowledge of just how identifier downcasing is done, in hopes of simplifying any future tweaking in this area.
* Don't use %s-with-precision format spec to truncate data being displayedTom Lane2004-01-18
| | | | | | | | | in a COPY error message. It seems that glibc gets indigestion if it is asked to truncate strings that contain invalid UTF-8 encoding sequences. vsnprintf will return -1 in such cases, leading to looping and eventual memory overflow in elog.c. Instead use our own, more robust pg_mbcliplen routine. I believe this problem accounts for several recent reports of unexpected 'out of memory' errors during COPY IN.
* Overdue code review for ALTER SEQUENCE patch. Don't generate illegal NodeTom Lane2003-11-24
| | | | | | tree for CYCLE option; don't assume zeros are invalid values for sequence fields other than increment_by; don't reset cache_value when not told to; simplify code for testing whether to apply defaults.
* Simplify loop test to avoid bug in AIX compiler, per Andreas.Tom Lane2003-10-18
|
* Adjust display of actual runtimes in EXPLAIN output to use three fractionalTom Lane2003-10-17
| | | | | digits, and label it 'ms' not 'msec', for consistency with psql's \timing display. Per recent discussions.
* Fix bad interaction between NOTIFY processing and V3 extended queryTom Lane2003-10-16
| | | | | | | | | | 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.
* Back out makeNode() patch to fix gcc 3.3.1 warning.Bruce Momjian2003-10-13
|
* Adjust setRelhassubclassInRelation() to not perform actual heap_updateTom Lane2003-10-13
| | | | | | | | | 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.
* Use makeNode() to allocate structures that have to be cast to Node *,Bruce Momjian2003-10-12
| | | | | | rather than allocating them on the stack. Fixes complaint from gcc 3.3.1.
* Back out -fstrict-aliasing void* casting.Bruce Momjian2003-10-11
|
* This patch will stop gcc from issuing warnings about type-punned objectsBruce Momjian2003-10-11
| | | | | | | when -fstrict-aliasing is turned on, as it is in the latest gcc when you use -O2 Andrew Dunstan
* During ALTER TABLE ADD FOREIGN KEY, try to check the existing rows usingTom Lane2003-10-06
| | | | | | 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.
* Modify COPY FROM to match the null-value string against the column valueTom Lane2003-10-06
| | | | | | | | | | | 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.
* Add a bit more locking to vac_update_relstats and vac_update_dbstatsTom Lane2003-10-02
| | | | | | | 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.
* String fixes/improvements found by Alvaro HerreraPeter Eisentraut2003-10-02
|
* Change some notices to warnings and vice versa according to criteriaPeter Eisentraut2003-10-02
| | | | developed on -hackers.
* Repair RI trigger visibility problems (this time for sure ;-)) per recentTom Lane2003-10-01
| | | | | | | 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.
* Improve context display for failures during COPY IN, as recentlyTom Lane2003-09-29
| | | | discussed on pghackers.
* Eliminate another gratuitous message wording difference.Peter Eisentraut2003-09-29
|
* More message editing, some suggested by Alvaro HerreraPeter Eisentraut2003-09-29
|
* Various message fixes, among those fixes for the previous round of fixesPeter Eisentraut2003-09-26
|
* Get rid of ReferentialIntegritySnapshotOverride by extending Executor APITom Lane2003-09-25
| | | | | | 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.
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* Repair some REINDEX problems per recent discussions. The relcache isTom Lane2003-09-24
| | | | | | | | | | | | | 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.
* Putting back the previous change must be the first thing.Hiroshi Inoue2003-09-23
| | | | | ALso put back a #ifndef ENABLE_REINDEX_NAILED_RELATIONS which was removed about a year ago.
* Disallow foreign-key references from temp tables to permanent tables.Tom Lane2003-09-19
| | | | | | | | | 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.
* Seems like a bad idea that REINDEX TABLE supports (or thinks it does)Tom Lane2003-09-19
| | | | | | 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.
* Fix LISTEN/NOTIFY race condition reported by Gavin Sherry. While aTom Lane2003-09-15
| | | | | | | | | | | | | | | 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?)
* Remove warnings for operations that have no effect when executed repeatedly.Peter Eisentraut2003-09-15
|
* Message in the other exit from acquire_sample_rows(), as per updateTom Lane2003-09-11
| | | | from Mark Kirkwood. Also show the sample size.
* Try to make recently-added analyze log message look something likeTom Lane2003-09-11
| | | | the others in style.
* Fix missed message update, per Alvaro Herrera.Tom Lane2003-09-11
|
* Improve error message for cp or rm failur during create/drop database,Tom Lane2003-09-10
| | | | per recent discussions.
* Add HINT if CREATE FUNCTION specifies a valid language, but the languageBruce Momjian2003-09-10
| | | | isn't loaded into the database.
* Some "feature not supported" errors are better syntax errors, because thePeter Eisentraut2003-09-09
| | | | | feature they complain about isn't a feature or cannot be implemented without definitional changes.
* Guard against pgindent changing =- to = -.Bruce Momjian2003-08-30
|