aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
...
* Fix log_duration and log_min_duration_statement to print properly, asBruce Momjian2003-10-04
| | | | pointed out by Peter.
* Add GUC parameter check_function_bodies to control whether validationTom Lane2003-10-03
| | | | | | | of function bodies is done at CREATE FUNCTION time. This is normally true but can be set false to avoid problems with forward references, wrong schema search path, etc. This is just the backend patch, still need to adjust pg_dump to make use of it.
* 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.
* When dumping CREATE INDEX, must show opclass name if the opclass isn'tTom Lane2003-10-02
| | | | | | in the schema search path. Otherwise pg_dump doesn't correctly dump scenarios where a custom opclass is created in 'public' and then used by indexes in other schemas.
* 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.
* Remove NOTICE about foreign key creating implicit triggers, because it noPeter Eisentraut2003-10-02
| | | | longer conveys useful information.
* 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.
* Adjust btree index build procedure so that the btree metapage looksTom Lane2003-09-29
| | | | | | | | | | invalid (has the wrong magic number) until the build is entirely complete. This turns out to cost no additional writes in the normal case, since we were rewriting the metapage at the end of the process anyway. In normal scenarios there's no real gain in security, because a failed index build would roll back the transaction leaving an unused index file, but for rebuilding shared system indexes this seems to add some useful protection.
* Improve context display for failures during COPY IN, as recentlyTom Lane2003-09-29
| | | | discussed on pghackers.
* The brackets aren't put on the CHECK constraints properly.Bruce Momjian2003-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before patch: test=# select pg_get_constraintdef(oid) from pg_constraint; pg_get_constraintdef ------------------------------------------------------------------------------------------------- CHECK (VALUE >= 0) CHECK ((((a)::text = 'asdf'::text) OR ((a)::text = 'fdsa'::text)) OR ((a)::text = 'dfd'::text)) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) test=# select pg_get_constraintdef(oid, true) from pg_constraint; pg_get_constraintdef ----------------------------------------------------------------------------------- CHECK VALUE >= 0 CHECK a::text = 'asdf'::text OR a::text = 'fdsa'::text OR a::text = 'dfd'::text PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) After patch: test=# select pg_get_constraintdef(oid) from pg_constraint; pg_get_constraintdef ------------------------------------------------------------------------------------------------- CHECK (VALUE >= 0) CHECK ((((a)::text = 'asdf'::text) OR ((a)::text = 'fdsa'::text)) OR ((a)::text = 'dfd'::text)) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) test=# select pg_get_constraintdef(oid, true) from pg_constraint; pg_get_constraintdef ----------------------------------------------------------------------------------- CHECK (VALUE >= 0) ` CHECK (a::text = 'asdf'::text OR a::text = 'fdsa'::text OR a::text = 'dfd'::text) PRIMARY KEY (b) FOREIGN KEY (a) REFERENCES test2(b) UNIQUE (b) (5 rows) It's important that those brackets are there to (a) match all other constraints and (b) so that people can just copy and paste them and it will work as SQL. Christopher Kings-Lynne
* This patch fixes an obvious bug in the "should I print the duration ofBruce Momjian2003-09-29
| | | | | | | | this query?" logic in postgres.c Also, make it print "duration:" like log_duration. Neil Conway
* I discovered that TupleDescGetAttInMetadata and BuildTupleFromCStringsBruce Momjian2003-09-29
| | | | | | | don't deal well with tuples having dropped columns. The attached fixes the issue. Please apply. Joe Conway
* Adjust the new Norwegian translation for some of the easier messagePeter Eisentraut2003-09-29
| | | | changes between 7.3 and 7.4, for example quoting and function names.
* Eliminate another gratuitous message wording difference.Peter Eisentraut2003-09-29
|
* New Norwegian translation by Trond Endrestøl, actually made for 7.3, butPeter Eisentraut2003-09-29
| | | | this should help people get started in 7.4 as well.
* New translationsPeter Eisentraut2003-09-29
|
* Fix broken definition of :print: character class, per Bruno Wolff.Tom Lane2003-09-29
| | | | | Also, make :alnum: character class directly dependent on isalnum() rather than guessing.
* Translation updatePeter Eisentraut2003-09-29
|
* More message editing, some suggested by Alvaro HerreraPeter Eisentraut2003-09-29
|
* Add a mechanism to let dynamically loaded modules register post-commit/Tom Lane2003-09-28
| | | | | | post-abort cleanup hooks. I'm surprised that we have not needed this already, but I need it now to fix a plpgsql problem, and the usefulness for other dynamically loaded modules seems obvious.
* Now that we have UPDATE tab SET col = DEFAULT, get rid of horrid hackTom Lane2003-09-28
| | | | | | in the RI triggers for ON DELETE/UPDATE SET DEFAULT. The code depended way too much on knowledge of plan structure, and yet still would fail if the generated query got rewritten by rules.
* Fix typo in message.Tom Lane2003-09-27
|
* You can't NLS-enable a program component by just putting gettext() aroundPeter Eisentraut2003-09-27
| | | | | | | every string, especially if some of the output should be fixed-format machine-readable. This needs to be more carefully sorted out. Also, make the help message generated by --help-config -h be more similar in style to the others.
* Various message fixes, among those fixes for the previous round of fixesPeter Eisentraut2003-09-26
|
* Translation updatePeter Eisentraut2003-09-26
|
* Fix tid scan evaluation of non-constant TID values; can't try to do itTom Lane2003-09-26
| | | | during ExecInitTidScan, because the rest of the executor isn't ready.
* Make the world safe (more or less) for dropped columns in plpgsql rowtypes.Tom Lane2003-09-25
|
* tlist_matches_tupdesc() needs to defend itself against dropped columns.Tom Lane2003-09-25
|
* 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.
* Fix grammatical error introduced into error message.Tom Lane2003-09-25
|
* 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.
* Tweak generic_type_consistency routines to avoid loss of functionalityTom Lane2003-09-23
| | | | | | | | since 7.3: 'select array_dims(histogram_bounds) from pg_stats' used to work and still should. Problem was that code wouldn't take input of declared type anyarray as matching an anyarray argument. Allow this case as long as we don't need to determine an element type (which in practice means as long as anyelement isn't used in the function signature).
* _SPI_cursor_operation forgot to check for failure return fromTom Lane2003-09-23
| | | | _SPI_begin_call. Per gripe from Tomasz Myrta.
* 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.
* HeapTupleSatisfiesVacuum() needs to be more careful about theTom Lane2003-09-22
| | | | | | | | | | | | | | | | | | | difference between INSERT_IN_PROGRESS and DELETE_IN_PROGRESS for tuples inserted and then deleted by a concurrent transaction. Example of bug: regression=# create table foo (f1 int); CREATE TABLE regression=# begin; BEGIN regression=# insert into foo values(1); INSERT 195531 1 regression=# delete from foo; DELETE 1 regression=# insert into foo values(1); INSERT 195532 1 regression=# create unique index fooi on foo(f1); ERROR: could not create unique index DETAIL: Table contains duplicated values.
* Arrange to align shared disk buffers on at least 32-byte boundaries,Tom Lane2003-09-21
| | | | | | | not just MAXALIGN boundaries. This makes a noticeable difference in the speed of transfers to and from kernel space, at least on recent Pentiums, and might help other CPUs too. We should look at making this happen for local buffers and buffile.c too. Patch from Manfred Spraul.
* Fix a batch of speling misteaks identified by Peter's spell-checker tool.Tom Lane2003-09-20
|
* 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.
* Disallow converting a table to a view if it has triggers, indexes, orTom Lane2003-09-17
| | | | | | | child tables --- all cases that will trip various sanity checks elsewhere in the system, as well as cases that should not occur in the only intended use of this feature, namely coping with ancient pg_dump representation of views. Per bug report from Chris Pizzi.
* Since SPI_modifytuple's natts argument is the number of attributes to beTom Lane2003-09-16
| | | | changed, it should allow a zero value (implying no changes to make).
* 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?)
* Improve a couple of error messages per suggestions from Alvaro Herrera.Tom Lane2003-09-15
|
* Translation updatesPeter Eisentraut2003-09-15
|
* OK, some of these syntax errors should be given other codes.Peter Eisentraut2003-09-15
|
* Remove warnings for operations that have no effect when executed repeatedly.Peter Eisentraut2003-09-15
|
* Run distprep target before creating list of files that contain translatablePeter Eisentraut2003-09-14
| | | | | strings in the backend, so that .l and .y files are included. To that end, don't make the .pot file a prerequisite on distprep.
* Reconsider placement of MemoryContextCheck() call --- do after commit,Tom Lane2003-09-14
| | | | not before, to avoid duplication of effort.