aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Fix constraint exclusion to work in inherited UPDATE/DELETE queriesTom Lane2006-02-04
| | | | | | | | | ... in fact, it will be applied now in any query whatsoever. I'm still a bit concerned about the cycles that might be expended in failed proof attempts, but given that CE is turned off by default, it's the user's choice whether to expend those cycles or not. (Possibly we should change the simple bool constraint_exclusion parameter to something more fine-grained?)
* Added C bit fields to ecpg parserMichael Meskes2006-02-04
| | | | | | Added some default rules to lexer Added log output to prepare statement Added some more stuff to a test case
* DROP IF EXISTS for ROLE/USER/GROUPAndrew Dunstan2006-02-04
|
* Issue a warning if a change-on-restart-only postgresql.conf value isPeter Eisentraut2006-02-04
| | | | modified and the server config files are reloaded
* In ecpg, automatically double single quotes in $$ strings becauseBruce Momjian2006-02-04
| | | | | | | internally $$ strings are converted to single-quote strings. In ecpg, output newlines in commands using standard C escapes, rather than using literal newlines, which is not portable.
* Update Makefile for new thread_test location.Bruce Momjian2006-02-04
|
* Move thread_test directory from /tools to /test so source-only tarballsBruce Momjian2006-02-04
| | | | have the directory for the configure test.
* Teach planner to convert simple UNION ALL subqueries into append relations,Tom Lane2006-02-03
| | | | | | | | | thereby sharing code with the inheritance case. This puts the UNION-ALL-view approach to partitioned tables on par with inheritance, so far as constraint exclusion is concerned: it works either way. (Still need to update the docs to say so.) The definition of "simple UNION ALL" is a little simpler than I would like --- basically the union arms can only be SELECT * FROM foo --- but it's good enough for partitioned-table cases.
* Update tested AIX memset platforms.Bruce Momjian2006-02-03
|
* Allow MEMSET_LOOP_LIMIT to be set on a per-platform basis, and turn offBruce Momjian2006-02-03
| | | | | | | MemSet on AIX by setting MEMSET_LOOP_LIMIT to zero. Add optimization to skip MemSet tests in MEMSET_LOOP_LIMIT == 0 case and just call memset() directly.
* Update random() usage so ranges are inclusive/exclusive as required.Bruce Momjian2006-02-03
|
* Prevent COPY from using newline or carriage return as delimiter or null.Bruce Momjian2006-02-03
| | | | | | Disallow backslash as the delimiter in non-CVS mode. David Fetter
* Improve tab whitespace in file.Bruce Momjian2006-02-03
| | | | Add comment about $$ and '' SCONST strings.
* More spacing cleanups.Bruce Momjian2006-02-02
|
* Source code alignment fixes for preproc.y.Bruce Momjian2006-02-01
|
* More alignment improvements.Bruce Momjian2006-02-01
|
* Make pgc.l source code alignment consistent.Bruce Momjian2006-02-01
|
* Add code comment about Linux stack randomization and shared memory.Bruce Momjian2006-02-01
|
* Fix const cast in get_progname().Bruce Momjian2006-02-01
| | | | Backpatch.
* Set progname early in the postmaster/postgres binary, rather than doingBruce Momjian2006-02-01
| | | | | | | | | | it later. This fixes a problem where EXEC_BACKEND didn't have progname set, causing a segfault if log_min_messages was set below debug2 and our own snprintf.c was being used. Also alway strdup() progname. Backpatch to 8.1.X and 8.0.X.
* Allow %TYPE to be used with SETOF, per gripe from Murat Tasan.Tom Lane2006-01-31
|
* Restructure planner's handling of inheritance. Rather than processingTom Lane2006-01-31
| | | | | | | | | | | | | inheritance trees on-the-fly, which pretty well constrained us to considering only one way of planning inheritance, expand inheritance sets during the planner prep phase, and build a side data structure that can be consulted later to find which RTEs are members of which inheritance sets. As proof of concept, use the data structure to plan joins against inheritance sets more efficiently: we can now use indexes on the set members in inner-indexscan joins. (The generated plans could be improved further, but it'll take some executor changes.) This data structure will also support handling UNION ALL subqueries in the same way as inheritance sets, but that aspect of it isn't finished yet.
* Fix ALTER COLUMN TYPE bug: it sometimes tried to drop UNIQUE or PRIMARY KEYTom Lane2006-01-30
| | | | | constraints before FOREIGN KEY constraints that depended on them. Originally reported by Neil Conway on 29-Jun-2005. Patch by Nakano Yoshihisa.
* When building a bitmap scan, must copy the bitmapqualorig expression treeTom Lane2006-01-29
| | | | | | | | to avoid sharing substructure with the lower-level indexquals. This is currently only an issue if there are SubPlans in the indexquals, which is uncommon but not impossible --- see bug #2218 reported by Nicholas Vinen. We use the same kluge for indexqual vs indexqualorig in the index scans themselves ... would be nice to clean this up someday.
* Fix Assert that's no longer correct now that RowCompareExpr is indexable.Tom Lane2006-01-29
|
* Fix code that checks to see if an index can be considered to match the query'sTom Lane2006-01-29
| | | | | | | | | requested sort order. It was assuming that build_index_pathkeys always generates a pathkey per index column, which was not true if implied equality deduction had determined that two index columns were effectively equated to each other. Simplest fix seems to be to install an option that causes build_index_pathkeys to support this behavior as well as the original one. Per report from Brian Hirt.
* Undo perl's nasty locale setting on Windows. Since we can't do that asAndrew Dunstan2006-01-28
| | | | | elsewhere by setting the environment appropriately, we make perl do it right after interpreter startup by calling its POSIX::setlocale().
* Per a bug report from Theo Schlossnagle, plperl_return_next() leaksNeil Conway2006-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | memory in the executor's per-query memory context. It also inefficient: it invokes get_call_result_type() and TupleDescGetAttInMetadata() for every call to return_next, rather than invoking them once (per PL/Perl function call) and memoizing the result. This patch makes the following changes: - refactor the code to include all the "per PL/Perl function call" data inside a single struct, "current_call_data". This means we don't need to save and restore N pointers for every recursive call into PL/Perl, we can just save and restore one. - lookup the return type metadata needed by plperl_return_next() once, and then stash it in "current_call_data", so as to avoid doing the lookup for every call to return_next. - create a temporary memory context in which to evaluate the return type's input functions. This memory context is reset for each call to return_next. The patch appears to fix the memory leak, and substantially reduces the overhead imposed by return_next.
* Tweak initdb to reduce verbosity of progress messages, by printing justTom Lane2006-01-27
| | | | | | | one 'creating subdirectories' message instead of one per subdirectory. The original decision to print something for each subdirectory was made when there were only one or two of 'em; we have way too many now. Per discussion.
* Suppress signed-vs-unsigned-char warning.Tom Lane2006-01-26
|
* Fix display of whole-row Var appearing at the top level of a SELECT list.Tom Lane2006-01-26
| | | | | | | | While we normally prefer the notation "foo.*" for a whole-row Var, that does not work at SELECT top level, because in that context the parser will assume that what is wanted is to expand the "*" into a list of separate target columns, yielding behavior different from a whole-row Var. We have to emit just "foo" instead in that context. Per report from Sokolov Yura.
* Clean up the INET-vs-CIDR situation. Get rid of the internal is_cidr flagTom Lane2006-01-26
| | | | | | | | and rely exclusively on the SQL type system to tell the difference between the types. Prevent creation of invalid CIDR values via casting from INET or set_masklen() --- both of these operations now silently zero any bits to the right of the netmask. Remove duplicate CIDR comparison operators, letting the type rely on the INET operators instead.
* Remove the no-longer-useful HashItem/HashItemData level of structure.Tom Lane2006-01-25
| | | | Same motivation as for BTItem.
* Remove the no-longer-useful BTItem/BTItemData level of structure, andTom Lane2006-01-25
| | | | | | | just refer to btree index entries as plain IndexTuples, which is what they have been for a very long time. This is mostly just an exercise in removing extraneous notation, but it does save a palloc/pfree cycle per index insertion.
* Remove unnecessary PQconsumeInput call from PQputCopyData; it's redundantTom Lane2006-01-25
| | | | | | | because pqSendSome will absorb input data anytime it'd be forced to block. Avoiding a kernel call per PQputCopyData call helps COPY speed materially. Alon Goldshuv
* Allow row comparisons to be used as indexscan qualifications.Tom Lane2006-01-25
| | | | This completes the project to upgrade our handling of row comparisons.
* Update regression error message for NUMERIC range overflow. Display "1"Bruce Momjian2006-01-25
| | | | instead of "10^0".
* Update regression error message for NUMERIC range overflow. Display "1"Bruce Momjian2006-01-25
| | | | instead of 10^0.
* Improve error message when NUMERIC precision is exceeded.Bruce Momjian2006-01-25
|
* Fix unportable usage of socklen_t: should use ACCEPT_TYPE_ARG3 macroTom Lane2006-01-24
| | | | provided by configure, instead. Per bug #2205.
* - Synced parser and keyword list.Michael Meskes2006-01-24
| | | | - Added another test case.
* Instead of using a numberOfRequiredKeys count to distinguish requiredTom Lane2006-01-23
| | | | | | | | | and non-required keys in a btree index scan, mark the required scankeys with private flag bits SK_BT_REQFWD and/or SK_BT_REQBKWD. This seems at least marginally clearer to me, and it eliminates a wired-into-the- data-structure assumption that required keys are consecutive. Even though that assumption will remain true for the foreseeable future, having it in there makes the code seem more complex than necessary.
* Prototype fix for typo.Bruce Momjian2006-01-23
|
* Use is_cidr in INET/CIDR structure, rather than the generic 'type'.Bruce Momjian2006-01-23
|
* Fix alias-for-target-table-of-UPDATE-or-DELETE patch so that alias canTom Lane2006-01-22
| | | | | be any ColId other than 'SET', rather than only IDENT as originally. Per discussion.
* Allow an optional alias for the target table to be specified for UPDATENeil Conway2006-01-22
| | | | | | | | | | and DELETE. If specified, the alias must be used instead of the full table name. Also, the alias currently cannot be used in the SET clause of UPDATE. Patch from Atsushi Ogawa, various editorialization by Neil Conway. Along the way, make the rowtypes regression test pass if add_missing_from is enabled, and add a new (skeletal) regression test for DELETE.
* Repair longstanding bug in slru/clog logic: it is possible for two backendsTom Lane2006-01-21
| | | | | | | | | | to try to create a log segment file concurrently, but the code erroneously specified O_EXCL to open(), resulting in a needless failure. Before 7.4, it was even a PANIC condition :-(. Correct code is actually simpler than what we had, because we can just say O_CREAT to start with and not need a second open() call. I believe this accounts for several recent reports of hard-to-reproduce "could not create file ...: File exists" errors in both pg_clog and pg_subtrans.
* Add GRANT ON SEQUENCE syntax to support sequence-only permissions.Bruce Momjian2006-01-21
| | | | | | | | | | | | | Continue to support GRANT ON [TABLE] for sequences for backward compatibility; issue warning for invalid sequence permissions. [Backward compatibility warning message.] Add USAGE permission for sequences that allows only currval() and nextval(), not setval(). Mention object name in grant/revoke warnings because of possible multi-object operations.
* Fix thinko in autovacuum's test to skip temp tables: want to skip anyTom Lane2006-01-20
| | | | | | temp table not only our own process' tables. It's not real important since vacuum.c will skip temp tables anyway, but might as well make the code do what it claims to do.
* Add some test scaffolding to allow cache-flush stress testing (and I doTom Lane2006-01-19
| | | | mean stress ... system is orders of magnitude slower with this enabled).