aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAge
...
* Fix for possible referential integrity violation when a qualified ON INSERTJan Wieck2003-10-31
| | | | | | | | rule split the query into one INSERT and one UPDATE where the UPDATE then hit's the just created row without modifying the key fields again. In this special case, the new key slipped in totally unchecked. Jan
* Fix some corner cases in ACL manipulation: don't foul up on an emptyTom Lane2003-10-29
| | | | | | ACL array, and force languages to be treated as owned by the bootstrap user ID. (pg_language should have a lanowner column, but until it does this will have to do as a workaround.)
* Cleanup on --help-config: Now called --describe-config, no further options,Peter Eisentraut2003-10-18
| | | | | machine readable, without headers, not sorted. Parameter descriptions adjusted to fit first sentence + rest convention.
* Fix elog tab-insertion code to insert tabs only where wanted.Tom Lane2003-10-17
|
* Avoid division by zero in estimate_num_groups() when table has no rows.Tom Lane2003-10-16
|
* Have log_min_duration_statement = 0 always print duration/statement.Bruce Momjian2003-10-08
| | | | | | Change log line to be "duration: ms query:" Indent multi-line queries with a tab in the server logs.
* 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.
* Fix pg_get_constraintdef() to ensure CHECK constraints are always shownTom Lane2003-10-04
| | | | | | | with required outer parentheses. Breakage seems to be leftover from domain-constraint patches. This could be smarter about suppressing extra parens, but at this stage of the release cycle I want certainty not cuteness.
* 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.
* 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.
* 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.
* 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
* More message editing, some suggested by Alvaro HerreraPeter Eisentraut2003-09-29
|
* 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.
* 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
|
* 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.
* 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.
* Improve a couple of error messages per suggestions from Alvaro Herrera.Tom Lane2003-09-15
|
* OK, some of these syntax errors should be given other codes.Peter Eisentraut2003-09-15
|
* Avoid corner cases where aset.c would unnecessarily make malloc()Tom Lane2003-09-13
| | | | | requests of sizes that aren't powers of 2. Per observation from David Schultz, 28-Aug.
* Okay, I've had it with mktime() bugs. While chasing Torello Querci'sTom Lane2003-09-13
| | | | | | | | recent gripe, I discovered not one but two undocumented, undesirable behaviors of glibc's mktime. So, stop using it entirely, and always rely on inversion of localtime() to determine the local time zone. It's not even very much slower, as it turns out that mktime (at least in the glibc implementation) also does repeated reverse-conversions.
* Consistenly lowercase GUC variable names, in docs and error messages.Bruce Momjian2003-09-11
|
* 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.
* Remove geqo_random_seed parameter. Having geqo reset the global random()Tom Lane2003-09-07
| | | | | | | | sequence every time it's called is bogus --- it interferes with user control over the seed, and actually decreases randomness overall (because a seed based on time(NULL) is pretty predictable). If you really want a reproducible result from geqo, do 'set seed = 0' before planning a query.
* load_file() has to remove pre-existing shlibs that match the new fileTom Lane2003-09-07
| | | | | | | on either name or inode; otherwise load_external_function() won't do anything. At least on Linux, it appears that recompiling a shlib leads to a new file with a different inode, so the old code failed to detect a match.
* Allow non-super users to set log_duration to true, then false, when theBruce Momjian2003-09-04
| | | | | administrator has not turned it on, and fix other PGC_USERLIMIT variables.
* Pass session_authorization to the client and make psql update its promptPeter Eisentraut2003-09-03
| | | | accordingly.
* Work around ENOTEMPTY being an alias for EEXIST on some platforms.Tom Lane2003-09-03
|
* Repair problems with to_char() overrunning its input string.Tom Lane2003-09-03
| | | | From Karel Zak.
* Do not pass server_encoding to the client.Peter Eisentraut2003-09-01
| | | | | | libpq, talking to an old server, should assume SQL_ASCII as the default client encoding, because that is what the server will actually use (not the server encoding).
* Rename DoIt to changeVar, for clarity.Bruce Momjian2003-09-01
|
* Adjust date/time input parsing code to correctly distinguish the fourTom Lane2003-08-27
| | | | | | | SQLSTATE error codes required by SQL99 (invalid format, datetime field overflow, interval field overflow, invalid time zone displacement value). Also emit a HINT about DateStyle in cases where it seems appropriate. Per recent gripes.
* Share PG_DIAG_* macros between client and server and use them internally.Peter Eisentraut2003-08-27
|
* Call it Linux, not GNU/Linux.Bruce Momjian2003-08-26
|
* Use separate SQLSTATE codes for file not found/file exists, rather thanTom Lane2003-08-26
| | | | | | | lumping them into ERRCODE_UNDEFINED_OBJECT/ERRCODE_DUPLICATE_OBJECT. This seems reasonable since 'object' was meant to refer to 'object in the database' and a file is outside the database. Per request from Dave Cramer.
* Mop-up for previous change to determine default shared_buffers andTom Lane2003-08-26
| | | | | | max_connections at initdb time. Get rid of DEF_NBUFFERS and DEF_MAXBACKENDS macros, which aren't doing anything useful anymore, and put more likely defaults into postgresql.conf.sample.
* Add the Brazilian time zone abbreviations BRT, BRST, FNT, FNST.Tom Lane2003-08-25
| | | | | ACT and ACST were already present. AMT and AMST conflict with the existing entries for Armenia; no change there for the moment.
* Allow parsing of time and timetz inputs to accept the documented inputTom Lane2003-08-25
| | | | | syntax '040506' for '04:05:06', as well as '0405' for '04:05:00'. This has been broken since 7.2 but was only recently complained of.
* Refactor code so that to_date() does not call to_timestamp() and thenTom Lane2003-08-25
| | | | | | | perform a timestamp-to-date coercion. Instead both routines share a subroutine that delivers the parsing result as a struct tm. This avoids problems with timezone dependency of to_date's result, and should be at least marginally faster too.
* Fix GB18030 to UTF-8 mapping tableTatsuo Ishii2003-08-25
|
* Change warnings for non-existing or pre-existing cursors to errors.Peter Eisentraut2003-08-24
|
* Fix GB18030 to UTF-8 mapping tableTatsuo Ishii2003-08-24
|
* Fix uninstall target.Peter Eisentraut2003-08-23
|
* Improve dynahash.c's API so that caller can specify the comparison functionTom Lane2003-08-19
| | | | | | | | | | | | | as well as the hash function (formerly the comparison function was hardwired as memcmp()). This makes it possible to eliminate the special-purpose hashtable management code in execGrouping.c in favor of using dynahash to manage tuple hashtables; which is a win because dynahash knows how to expand a hashtable when the original size estimate was too small, whereas the special-purpose code was too stupid to do that. (See recent gripe from Stephan Szabo about poor performance when hash table size estimate is way off.) Free side benefit: when using string_hash, the default comparison function is now strncmp() instead of memcmp(). This should eliminate some part of the overhead associated with larger NAMEDATALEN values.
* Fix ARRAY[] construct so that in multidimensional case, elements canTom Lane2003-08-17
| | | | | | | | be anything yielding an array of the proper kind, not only sub-ARRAY[] constructs; do subscript checking at runtime not parse time. Also, adjust array_cat to make array || array comply with the SQL99 spec. Joe Conway
* Somebody forgot to include any actual documentation for ADD_MISSING_FROM.Tom Lane2003-08-17
|
* Create a 'type cache' that keeps track of the data needed for any particularTom Lane2003-08-17
| | | | | | | | | | | 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.