aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* Make 'col IS NULL' clauses be indexable conditions.Tom Lane2007-04-06
| | | | Teodor Sigaev, with some kibitzing from Tom Lane.
* Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to beTom Lane2007-04-06
| | | | | | right, there seems precious little reason to have a pile of hand-maintained endianness definitions in src/include/port/*.h. Get rid of those, and make the couple of places that used them depend on WORDS_BIGENDIAN instead.
* Support varlena fields with single-byte headers and unaligned storage.Tom Lane2007-04-06
| | | | | | | | | This commit breaks any code that assumes that the mere act of forming a tuple (without writing it to disk) does not "toast" any fields. While all available regression tests pass, I'm not totally sure that we've fixed every nook and cranny, especially in contrib. Greg Stark with some help from Tom Lane
* Update XML error message text for missing libxml; update regressionBruce Momjian2007-04-05
| | | | output to match.
* Improve documentation/warning when --with-libxml is not used in theBruce Momjian2007-04-05
| | | | installation.
* Remove the CheckpointStartLock in favor of having backends show whether theyTom Lane2007-04-03
| | | | | | | | | | are in their commit critical sections via flags in the ProcArray. Checkpoint can watch the ProcArray to determine when it's safe to proceed. This is a considerably better solution to the original problem of race conditions between checkpoint and transaction commit: it speeds up commit, since there's one less lock to fool with, and it prevents the problem of checkpoint being delayed indefinitely when there's a constant flow of commits. Heikki, with some kibitzing from Tom.
* Decouple the values of TOAST_TUPLE_THRESHOLD and TOAST_MAX_CHUNK_SIZE.Tom Lane2007-04-03
| | | | | | | | | | | Add the latter to the values checked in pg_control, since it can't be changed without invalidating toast table content. This commit in itself shouldn't change any behavior, but it lays some necessary groundwork for experimentation with these toast-control numbers. Note: while TOAST_TUPLE_THRESHOLD can now be changed without initdb, some thought still needs to be given to needs_toast_table() in toasting.c before unleashing random changes.
* Allow NOTIFY/LISTEN/UNLISTEN to only take relation names, notBruce Momjian2007-04-02
| | | | | schema.relation, because the notify code only honors the relation name. schema.relation will now generate a syntax error.
* Check length of enum literals on definition and input to make sure they will ↵Andrew Dunstan2007-04-02
| | | | fit in a name field and not cause syscache errors.
* Fix check_sql_fn_retval to allow the case where a SQL function declared toTom Lane2007-04-02
| | | | | | | | return void ends with a SELECT, if that SELECT has a single result that is also of type void. Without this, it's hard to write a void function that calls another void function. Per gripe from Peter. Back-patch as far as 8.0.
* Support enum data types. Along the way, use macros for the values ofTom Lane2007-04-02
| | | | | pg_type.typtype whereever practical. Tom Dunstan, with some kibitzing from Tom Lane.
* Update SQL conformance for SQL to XML mappingsPeter Eisentraut2007-04-01
|
* Mapping schemas and databases to XML and XML Schema.Peter Eisentraut2007-04-01
| | | | Refactor and document the remaining mapping code.
* Add some instrumentation to the bgwriter, through the stats collector.Magnus Hagander2007-03-30
| | | | New view pg_stat_bgwriter, and the functions required to build it.
* Fix oversight in coding of _bt_start_vacuum: we can't assume that the LWLockTom Lane2007-03-30
| | | | | | | will be released by transaction abort before _bt_end_vacuum gets called. If either of these "can't happen" errors actually happened, we'd freeze up trying to acquire an already-held lock. Latest word is that this does not explain Martin Pitt's trouble report, but it still looks like a bug.
* exec_parse_message neglected to copy parameter type array into theTom Lane2007-03-29
| | | | | required memory context when handling client-specified parameter types for an unnamed statement. Per report from Kris Jurka.
* Teach CLUSTER to skip writing WAL if not needed (ie, not using archiving)Tom Lane2007-03-29
| | | | | --- Simon. Also, code review and cleanup for the previous COPY-no-WAL patches --- Tom.
* Code cleanup for the new regexp UDFs: we can hardcode the OID and someNeil Conway2007-03-28
| | | | | properties of the "text" type, and then simplify the code accordingly. Patch from Jeremy Drake.
* Add the "recheck" logic to autovacuum worker code. The worker first buildsAlvaro Herrera2007-03-28
| | | | | | | | | | | its table list and then rechecks pgstat before vacuuming each table to verify that no one has vacuumed the table in the meantime. In the current autovacuum world this only means that a worker will not vacuum a table that a user has vacuumed manually after the worker started. When support for multiple autovacuum workers is introduced, this will reduce the probability of simultaneous workers on the same database doing redundant work.
* Fix compiler warnings in ereport messages on mingw.Magnus Hagander2007-03-28
| | | | ITAGAKI Takahiro
* Fix array coercion expressions to ensure that the correct volatility isTom Lane2007-03-27
| | | | | | | | | seen by code inspecting the expression. The best way to do this seems to be to drop the original representation as a function invocation, and instead make a special expression node type that represents applying the element-type coercion function to each array element. In this way the element function is exposed and will be checked for volatility. Per report from Guillaume Smet.
* Cosmetic changes: rename some struct fields, and move the fetching of pgstatAlvaro Herrera2007-03-27
| | | | | table entries to a separate routine. Don't pass the pgstat database entry to do_autovacuum; rather, have it fetch it by itself.
* Fix typo in Makefile.Bruce Momjian2007-03-27
| | | | Marko Kreen
* Remove Andrew Yu copyright, with permission from author.Bruce Momjian2007-03-26
|
* Remove advertising clause from Berkeley BSD-licensed files, perBruce Momjian2007-03-26
| | | | instructions from Berkeley.
* Allow non-superuser database owners to create procedural languages.Tom Lane2007-03-26
| | | | | | | | | | A DBA is allowed to create a language in his database if it's marked "tmpldbacreate" in pg_pltemplate. The factory default is that this is set for all standard trusted languages, but of course a superuser may adjust the settings. In service of this, add the long-foreseen owner column to pg_language; renaming, dropping, and altering owner of a PL now follow normal ownership rules instead of being superuser-only. Jeremy Drake, with some editorialization by Tom Lane.
* Fix pg_wchar_table's maxmblen field of EUC_CN, EUC_TW, MULE_INTERNALTatsuo Ishii2007-03-26
| | | | and GB18030. patches from ITAGAKI Takahiro.
* Fix plancache's invalidation callback to do the right thing for a SITom Lane2007-03-26
| | | | | | reset event, namely invalidate everything. This oversight probably explains the rare failures that some buildfarm machines have been showing for the plancache regression test.
* Make _SPI_execute_plan pass the query source string down to ProcessUtilityTom Lane2007-03-25
| | | | | | if possible. I had left this undone in the first pass at the API change for ProcessUtility, but forgot to revisit it after the plancache changes made it possible to do it.
* Remove the prohibition on executing cursor commands through SPI_execute.Tom Lane2007-03-25
| | | | | | | | | Vadim had included this restriction in the original design of the SPI code, but I'm darned if I can see a reason for it. I left the macro definition of SPI_ERROR_CURSOR in place, so as not to needlessly break any SPI callers that are checking for it, but that code will never actually be returned anymore.
* Clean up the representation of special snapshots by including a "methodTom Lane2007-03-25
| | | | | | | | | | | | | | | | | | | | | pointer" in every Snapshot struct. This allows removal of the case-by-case tests in HeapTupleSatisfiesVisibility, which should make it a bit faster (I didn't try any performance tests though). More importantly, we are no longer violating portable C practices by assuming that small integers are distinct from all pointer values, and HeapTupleSatisfiesDirty no longer has a non-reentrant API involving side-effects on a global variable. There were a couple of places calling HeapTupleSatisfiesXXX routines directly rather than through the HeapTupleSatisfiesVisibility macro. Since these places had to be changed anyway, I chose to make them go through the macro for uniformity. Along the way I renamed HeapTupleSatisfiesSnapshot to HeapTupleSatisfiesMVCC to emphasize that it's only used with MVCC-type snapshots. I was sorely tempted to rename HeapTupleSatisfiesVisibility to HeapTupleSatisfiesSnapshot, but forebore for the moment to avoid confusion and reduce the likelihood that this patch breaks some of the pending patches. Might want to reconsider doing that later.
* Add new encoding EUC_JIS_2004 and SHIFT_JIS_2004,Tatsuo Ishii2007-03-25
| | | | | along with new conversions among EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8. catalog version has been bump up.
* Set the node properly, per Tom.Alvaro Herrera2007-03-23
|
* Separate the code to start a new worker into its own function. The code isAlvaro Herrera2007-03-23
| | | | exactly the same, modulo whitespace.
* Separate fetch of pg_autovacuum tuple into its own function.Alvaro Herrera2007-03-23
|
* We no longer need to palloc the VacuumStmt node; keeping it on the stack isAlvaro Herrera2007-03-23
| | | | simpler.
* Fix plancache so that any required replanning is done with the sameTom Lane2007-03-23
| | | | | | | | | search_path that was active when the plan was first made. To do this, improve namespace.c to support a stack of "override" search path settings (we must have a stack since nested replan events are entirely possible). This facility replaces the "special namespace" hack formerly used by CREATE SCHEMA, and should be able to support per-function search path settings as well.
* Allow 4 bytes UTF-8 (UCS-4 range 00010000-001FFFFF)Tatsuo Ishii2007-03-23
| | | | This is necessary to support JIS X 0213 <--> UTF-8 conversion.
* Cleanup for procarray.c.Bruce Momjian2007-03-23
|
* Commit newest version of xmlpath().Bruce Momjian2007-03-22
| | | | Nikolay Samokhvalov
* Add xmlpath() to evaluate XPath expressions, with namespaces support.Bruce Momjian2007-03-22
| | | | Nikolay Samokhvalov
* Arrange for PreventTransactionChain to reject commands submitted as partTom Lane2007-03-22
| | | | | | | of a multi-statement simple-Query message. This bug goes all the way back, but unfortunately is not nearly so easy to fix in existing releases; it is only the recent ProcessUtility API change that makes it fixable in HEAD. Per report from William Garrison.
* Allow the pgstat process to restart immediately after a receivingBruce Momjian2007-03-22
| | | | SIGQUIT signal, rather than waiting for PGSTAT_RESTART_INTERVAL.
* Allow DROP TABLESPACE to succeed (with a warning) if the pg_tblspc symlinkTom Lane2007-03-22
| | | | | | | | | | | doesn't exist. This allows DROP to be used to clean out the pg_tablespace catalog entry in a situation where a previous DROP attempt failed before committing but after having removed the directories and symlink. Per report from William Garrison. Even though his test case depends on an unrelated bug in PreventTransactionChain, it's certainly possible for this situation to arise due to other problems, eg a system crash at just the right time.
* Remove the currently unused FRONTEND case in dllist.c. This allows the usageAlvaro Herrera2007-03-22
| | | | | of palloc instead of malloc, which means a list can be freed simply by deleting the memory context that contains it.
* Fix some problems with selectivity estimation for partial indexes.Tom Lane2007-03-21
| | | | | | | | | | | | | | | | | | | | | First, genericcostestimate() was being way too liberal about including partial-index conditions in its selectivity estimate, resulting in substantial underestimates for situations such as an indexqual "x = 42" used with an index on x "WHERE x >= 40 AND x < 50". While the code is intentionally set up to favor selecting partial indexes when available, this was too much... Second, choose_bitmap_and() was likewise easily fooled by cases of this type, since it would similarly think that the partial index had selectivity independent of the indexqual. Fixed by using predicate_implied_by() rather than simple equality checks to determine redundancy. This is a good deal more expensive but I don't see much alternative. At least the extra cost is only paid when there's actually a partial index under consideration. Per report from Jeff Davis. I'm not going to risk back-patching this, though.
* Native shared memory implementation for win32.Magnus Hagander2007-03-21
| | | | Uses same underlying tech as before, but not the sysv emulation layer.
* Add three new regexp functions: regexp_matches, regexp_split_to_array,Neil Conway2007-03-20
| | | | | | | | | | | | and regexp_split_to_table. These functions provide access to the capture groups resulting from a POSIX regular expression match, and provide the ability to split a string on a POSIX regular expression, respectively. Patch from Jeremy Drake; code review by Neil Conway, additional comments and suggestions from Tom and Peter E. This patch bumps the catversion, adds some regression tests, and updates the docs.
* Changes pg_trigger and extend pg_rewrite in order to allow triggers andJan Wieck2007-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rules to be defined with different, per session controllable, behaviors for replication purposes. This will allow replication systems like Slony-I and, as has been stated on pgsql-hackers, other products to control the firing mechanism of triggers and rewrite rules without modifying the system catalog directly. The firing mechanisms are controlled by a new superuser-only GUC variable, session_replication_role, together with a change to pg_trigger.tgenabled and a new column pg_rewrite.ev_enabled. Both columns are a single char data type now (tgenabled was a bool before). The possible values in these attributes are: 'O' - Trigger/Rule fires when session_replication_role is "origin" (default) or "local". This is the default behavior. 'D' - Trigger/Rule is disabled and fires never 'A' - Trigger/Rule fires always regardless of the setting of session_replication_role 'R' - Trigger/Rule fires when session_replication_role is "replica" The GUC variable can only be changed as long as the system does not have any cached query plans. This will prevent changing the session role and accidentally executing stored procedures or functions that have plans cached that expand to the wrong query set due to differences in the rule firing semantics. The SQL syntax for changing a triggers/rules firing semantics is ALTER TABLE <tabname> <when> TRIGGER|RULE <name>; <when> ::= ENABLE | ENABLE ALWAYS | ENABLE REPLICA | DISABLE psql's \d command as well as pg_dump are extended in a backward compatible fashion. Jan
* Fix 8.2 breakage of domains over array types, and add a regression test caseTom Lane2007-03-19
| | | | to cover it. Per report from Anton Pikhteryev.