Commit Graph

  • 33b41590df Adjust the definition of is_pushed_down so that it's always true for INNER JOIN quals, just like WHERE quals, even if they reference every one of the join's relations. Now that we can reorder outer and inner joins, it's possible for such a qual to end up being assigned to an outer join plan node, and we mustn't have it treated as a join qual rather than a filter qual for the node. (If it were, the join could produce null-extended rows that it shouldn't.) Per bug report from Pelle Johansson. Tom Lane 2007-02-16 20:57:26 +00:00
  • 8249409bc1 Adjust the definition of is_pushed_down so that it's always true for INNER JOIN quals, just like WHERE quals, even if they reference every one of the join's relations. Now that we can reorder outer and inner joins, it's possible for such a qual to end up being assigned to an outer join plan node, and we mustn't have it treated as a join qual rather than a filter qual for the node. (If it were, the join could produce null-extended rows that it shouldn't.) Per bug report from Pelle Johansson. Tom Lane 2007-02-16 20:57:19 +00:00
  • e472f13f99 Better fix for determining minimum and maximum int64 values that doesn't require stdint.h and works for "busted" int64. Peter Eisentraut 2007-02-16 18:37:43 +00:00
  • 8d2b05df9a Install a more correct fix in the timestamp and timestamptz regression tests: remove duplicated tests in timestamp, and complete timestamptz with the tests that were missing to more closely mirror timestamp. Alvaro Herrera 2007-02-16 17:49:15 +00:00
  • b6c9165ea0 Code review for SSLKEY patch. Tom Lane 2007-02-16 17:07:00 +00:00
  • 5ce7599bcd Fix markup, spelling, grammar, and explanations for SSLKEY patch. Tom Lane 2007-02-16 16:37:29 +00:00
  • 7f1d68a400 Fix the timestamptz test problem, by moving the tests that use the timestamp_tbl table into the timestamp test. Also, restore a test that used to exist as a valid test in the timestamptz test. Alvaro Herrera 2007-02-16 15:42:42 +00:00
  • 89b18bdd2a Fix // comment Peter Eisentraut 2007-02-16 10:55:47 +00:00
  • cf3aeb2f8b Add stdint.h include Peter Eisentraut 2007-02-16 10:42:31 +00:00
  • 355e05ab41 Functions for mapping table data and table schemas to XML (a.k.a. XML export) Peter Eisentraut 2007-02-16 07:46:55 +00:00
  • bb0a8a3ad4 Remove extra character erroneously added. Bruce Momjian 2007-02-16 03:56:45 +00:00
  • 4ab7ea5ace Remove tabs from SGML files to help tag alingment and improve detection of tabs are added in the future. Bruce Momjian 2007-02-16 03:50:29 +00:00
  • 36e24e8d17 Fix another problem in 8.2 changes that allowed "one-time" qual conditions to be checked at plan levels below the top; namely, we have to allow for Result nodes inserted just above a nestloop inner indexscan. Should think about using the general Param mechanism to pass down outer-relation variables, but for the moment we need a back-patchable solution. Per report from Phil Frost. Tom Lane 2007-02-16 03:49:10 +00:00
  • 7ea758b0b1 Fix another problem in 8.2 changes that allowed "one-time" qual conditions to be checked at plan levels below the top; namely, we have to allow for Result nodes inserted just above a nestloop inner indexscan. Should think about using the general Param mechanism to pass down outer-relation variables, but for the moment we need a back-patchable solution. Per report from Phil Frost. Tom Lane 2007-02-16 03:49:04 +00:00
  • 4ebb0cf9c3 Add two new format fields for use with to_char(), to_date() and to_timestamp(): - ID for day-of-week - IDDD for day-of-year Bruce Momjian 2007-02-16 03:39:46 +00:00
  • c7b08050d9 SSL improvements: Bruce Momjian 2007-02-16 02:59:41 +00:00
  • 68046a20c7 Remove useless database name from bootstrap argument processing (including startup and bgwriter processes), and the -y flag. It's not used anywhere. Alvaro Herrera 2007-02-16 02:10:07 +00:00
  • 0990afb8e2 Restructure code that is responsible for ensuring that clauseless joins are considered when it is necessary to do so because of a join-order restriction (that is, an outer-join or IN-subselect construct). The former coding was a bit ad-hoc and inconsistent, and it missed some cases, as exposed by Mario Weilguni's recent bug report. His specific problem was that an IN could be turned into a "clauseless" join due to constant-propagation removing the IN's joinclause, and if the IN's subselect involved more than one relation and there was more than one such IN linking to the same upper relation, then the only valid join orders involve "bushy" plans but we would fail to consider the specific paths needed to get there. (See the example case added to the join regression test.) On examining the code I wonder if there weren't some other problem cases too; in particular it seems that GEQO was defending against a different set of corner cases than the main planner was. There was also an efficiency problem, in that when we did realize we needed a clauseless join because of an IN, we'd consider clauseless joins against every other relation whether this was sensible or not. It seems a better design is to use the outer-join and in-clause lists as a backup heuristic, just as the rule of joining only where there are joinclauses is a heuristic: we'll join two relations if they have a usable joinclause *or* this might be necessary to satisfy an outer-join or IN-clause join order restriction. I refactored the code to have just one place considering this instead of three, and made sure that it covered all the cases that any of them had been considering. Tom Lane 2007-02-16 00:14:16 +00:00
  • 84222cf0dd Restructure code that is responsible for ensuring that clauseless joins are considered when it is necessary to do so because of a join-order restriction (that is, an outer-join or IN-subselect construct). The former coding was a bit ad-hoc and inconsistent, and it missed some cases, as exposed by Mario Weilguni's recent bug report. His specific problem was that an IN could be turned into a "clauseless" join due to constant-propagation removing the IN's joinclause, and if the IN's subselect involved more than one relation and there was more than one such IN linking to the same upper relation, then the only valid join orders involve "bushy" plans but we would fail to consider the specific paths needed to get there. (See the example case added to the join regression test.) On examining the code I wonder if there weren't some other problem cases too; in particular it seems that GEQO was defending against a different set of corner cases than the main planner was. There was also an efficiency problem, in that when we did realize we needed a clauseless join because of an IN, we'd consider clauseless joins against every other relation whether this was sensible or not. It seems a better design is to use the outer-join and in-clause lists as a backup heuristic, just as the rule of joining only where there are joinclauses is a heuristic: we'll join two relations if they have a usable joinclause *or* this might be necessary to satisfy an outer-join or IN-clause join order restriction. I refactored the code to have just one place considering this instead of three, and made sure that it covered all the cases that any of them had been considering. Tom Lane 2007-02-16 00:14:08 +00:00
  • 6bef118b01 Restructure code that is responsible for ensuring that clauseless joins are considered when it is necessary to do so because of a join-order restriction (that is, an outer-join or IN-subselect construct). The former coding was a bit ad-hoc and inconsistent, and it missed some cases, as exposed by Mario Weilguni's recent bug report. His specific problem was that an IN could be turned into a "clauseless" join due to constant-propagation removing the IN's joinclause, and if the IN's subselect involved more than one relation and there was more than one such IN linking to the same upper relation, then the only valid join orders involve "bushy" plans but we would fail to consider the specific paths needed to get there. (See the example case added to the join regression test.) On examining the code I wonder if there weren't some other problem cases too; in particular it seems that GEQO was defending against a different set of corner cases than the main planner was. There was also an efficiency problem, in that when we did realize we needed a clauseless join because of an IN, we'd consider clauseless joins against every other relation whether this was sensible or not. It seems a better design is to use the outer-join and in-clause lists as a backup heuristic, just as the rule of joining only where there are joinclauses is a heuristic: we'll join two relations if they have a usable joinclause *or* this might be necessary to satisfy an outer-join or IN-clause join order restriction. I refactored the code to have just one place considering this instead of three, and made sure that it covered all the cases that any of them had been considering. Tom Lane 2007-02-16 00:14:01 +00:00
  • 1820650934 Restructure autovacuum in two processes: a dummy process, which runs continuously, and requests vacuum runs of "autovacuum workers" to postmaster. The workers do the actual vacuum work. This allows for future improvements, like allowing multiple autovacuum jobs running in parallel. Alvaro Herrera 2007-02-15 23:23:23 +00:00
  • eecbb33267 Add ORDER BY to a query on information_schema.views, to avoid possible platform-specific result ordering. Per buildfarm results. Tom Lane 2007-02-15 05:05:03 +00:00
  • 9e850cfc72 Repair oversight in 8.2 change that improved the handling of "pseudoconstant" WHERE clauses. createplan.c is now willing to stick a gating Result node almost anywhere in the plan tree, and in particular one can wind up directly underneath a MergeJoin node. This means it had better be willing to handle Mark/Restore. Fortunately, that's trivial in such cases, since we can just pass off the call to the input node (which the planner has previously ensured can handle Mark/Restore). Per report from Phil Frost. Tom Lane 2007-02-15 03:07:21 +00:00
  • bfe553fb49 Repair oversight in 8.2 change that improved the handling of "pseudoconstant" WHERE clauses. createplan.c is now willing to stick a gating Result node almost anywhere in the plan tree, and in particular one can wind up directly underneath a MergeJoin node. This means it had better be willing to handle Mark/Restore. Fortunately, that's trivial in such cases, since we can just pass off the call to the input node (which the planner has previously ensured can handle Mark/Restore). Per report from Phil Frost. Tom Lane 2007-02-15 03:07:13 +00:00
  • d19da98a7f Make it possible to build with integer datetimes in msvc, and enable by default. Magnus Hagander 2007-02-14 21:02:07 +00:00
  • 01191c7177 Add: Bruce Momjian 2007-02-14 21:00:17 +00:00
  • 5b68dfb06d Add some discussion of sort ordering to indices.sgml, which curiously had never touched the subject before. Tom Lane 2007-02-14 20:47:15 +00:00
  • 2f8ee82964 Fix typo Peter Eisentraut 2007-02-14 18:46:08 +00:00
  • 764122471a Fix to_date()/to_timestamp() 'D' field for day of week, was off by one. Converting from char using 'D' doesn't make lots of sense, of course. Bruce Momjian 2007-02-14 05:10:55 +00:00
  • a9eb53969a Move fsync method macro defines into /include/access/xlogdefs.h so they can be used by src/tools/fsync/test_fsync.c. Bruce Momjian 2007-02-14 05:00:40 +00:00
  • 5c63829f2f Minor editorialization on operator-family documentation: put some copied-and-pasted text in a more useful location. Tom Lane 2007-02-14 04:30:26 +00:00
  • 33d72c7351 Add: Bruce Momjian 2007-02-14 04:24:42 +00:00
  • 7de3375f78 Add: Bruce Momjian 2007-02-14 04:19:37 +00:00
  • 595630af28 Fix capitalization and punctuation of two more GUC description strings. Neil Conway 2007-02-14 03:08:44 +00:00
  • d7250994e6 Add URL for: Bruce Momjian 2007-02-14 02:49:37 +00:00
  • 7bddca3450 Fix up foreign-key mechanism so that there is a sound semantic basis for the equality checks it applies, instead of a random dependence on whatever operators might be named "=". The equality operators will now be selected from the opfamily of the unique index that the FK constraint depends on to enforce uniqueness of the referenced columns; therefore they are certain to be consistent with that index's notion of equality. Among other things this should fix the problem noted awhile back that pg_dump may fail for foreign-key constraints on user-defined types when the required operators aren't in the search path. This also means that the former warning condition about "foreign key constraint will require costly sequential scans" is gone: if the comparison condition isn't indexable then we'll reject the constraint entirely. All per past discussions. Tom Lane 2007-02-14 01:58:58 +00:00
  • 65e2f55031 Add URL for: Bruce Momjian 2007-02-14 00:47:05 +00:00
  • e4f45d29be Add URL for: Bruce Momjian 2007-02-13 23:23:11 +00:00
  • 6e5c64b551 Add: Bruce Momjian 2007-02-13 19:57:09 +00:00
  • e6aa62ec14 Disallow committing a prepared transaction unless we are in the same database it was executed in. Someday it might be nice to allow cross-DB commits, but work would be needed in NOTIFY and perhaps other places. Per Heikki. Tom Lane 2007-02-13 19:39:55 +00:00
  • 538a983237 Disallow committing a prepared transaction unless we are in the same database it was executed in. Someday it might be nice to allow cross-DB commits, but work would be needed in NOTIFY and perhaps other places. Per Heikki. Tom Lane 2007-02-13 19:39:48 +00:00
  • caf2b64a75 Disallow committing a prepared transaction unless we are in the same database it was executed in. Someday it might be nice to allow cross-DB commits, but work would be needed in NOTIFY and perhaps other places. Per Heikki. Tom Lane 2007-02-13 19:39:42 +00:00
  • cf4cc7843c Improve postmaster's behavior if an accept() call fails. Because the server socket is still read-ready, the code was a tight loop, wasting lots of CPU. We can't do anything to clear the failure, other than wait, but we should give other processes more chance to finish and release FDs; so insert a small sleep. Also, avoid bogus "close(-1)" in this case. Per report from Jim Nasby. Tom Lane 2007-02-13 19:18:54 +00:00
  • b9c65aed82 Add URL for: Bruce Momjian 2007-02-13 18:08:39 +00:00
  • d9db80f38d Add code so database scans are done in an order consistent with pg_dumpall. Bruce Momjian 2007-02-13 18:06:18 +00:00
  • fb2b088cf4 Update /contrib/fuzzystrmatch error message to mention bytes, not just 'length', which can be characters. Bruce Momjian 2007-02-13 18:00:35 +00:00
  • 3607cb0488 Add ORDER BY to vacummdb so databases are scaned in the same order as pg_dumpall. Bruce Momjian 2007-02-13 17:39:39 +00:00
  • 954eb25a11 Add: Bruce Momjian 2007-02-13 17:03:16 +00:00
  • d2ad1a8e63 Un-break build on ANSI compilers (like msvc) by moving Assert to position after variable declarations. Magnus Hagander 2007-02-13 15:56:12 +00:00
  • 43bcf568dc Add script to run regression tests under vc++ without mingw. Update clean script to properly clean up the result of it. Magnus Hagander 2007-02-13 15:36:32 +00:00
  • 33692c104b One more fix for makefile := to : change. Magnus Hagander 2007-02-13 15:34:49 +00:00
  • cff7fcf173 Properly parse Makefile after change from := to =. Magnus Hagander 2007-02-13 15:01:52 +00:00
  • bc16005c0d Repair bug in 8.2's new logic for planning outer joins: we have to allow joins that overlap an outer join's min_righthand but aren't fully contained in it, to support joining within the RHS after having performed an outer join that can commute with this one. Aside from the direct fix in make_join_rel(), fix has_join_restriction() and GEQO's desirable_join() to consider this possibility. Per report from Ian Harding. Tom Lane 2007-02-13 02:31:12 +00:00
  • c17117649b Repair bug in 8.2's new logic for planning outer joins: we have to allow joins that overlap an outer join's min_righthand but aren't fully contained in it, to support joining within the RHS after having performed an outer join that can commute with this one. Aside from the direct fix in make_join_rel(), fix has_join_restriction() and GEQO's desirable_join() to consider this possibility. Per report from Ian Harding. Tom Lane 2007-02-13 02:31:03 +00:00
  • 849b070707 Add comment to explain why O_EXCL and O_TRUNC can be ignored in openFlagsToCreateFileFlags() in certain cases. Bruce Momjian 2007-02-13 02:06:22 +00:00
  • d1d3f4d015 Add comment that to_char() for broken glibc pt_BR might cause a problem. Bruce Momjian 2007-02-13 02:00:55 +00:00
  • 33c4a77f29 Avoid infinite recursion when dumping new planner EquivalenceClass trees. Tom Lane 2007-02-12 17:19:30 +00:00
  • bcac5703ec Fix backend crash in parsing incorrect tsquery. Teodor Sigaev 2007-02-12 14:19:26 +00:00
  • 0652254108 Fix backend crash in parsing incorrect tsquery. Teodor Sigaev 2007-02-12 14:18:43 +00:00
  • 3e5a4a9a08 Fix backend crash in parsing incorrect tsquery. Teodor Sigaev 2007-02-12 14:17:40 +00:00
  • 15f910da96 Fix backend crash in parsing incorrect tsquery. Teodor Sigaev 2007-02-12 14:15:13 +00:00
  • 44655290cc Fix backend crash in parsing incorrect tsquery. Teodor Sigaev 2007-02-12 14:14:33 +00:00
  • eb19144894 Add support for optionally escaping periods when converting SQL identifiers to XML names, which will be required for supporting XML export. Peter Eisentraut 2007-02-11 22:18:16 +00:00
  • 733abd2987 Fix another erroneous =-for-:= substitution. Tom Lane 2007-02-11 19:31:45 +00:00
  • 153affd058 Fixed multibyte handling as reported by <harada.toshi@oss.ntt.co.jp>. Michael Meskes 2007-02-11 15:18:17 +00:00
  • b8a26a6240 Fix for early log messages during postmaster startup getting lost when running as a service on Win32. Magnus Hagander 2007-02-11 15:12:48 +00:00
  • 9c6cfdc239 Fix for early log messages during postmaster startup getting lost when running as a service on Win32. Magnus Hagander 2007-02-11 15:12:21 +00:00
  • b8188e1e64 Fix for early log messages during postmaster startup getting lost when running as a service on Win32. Magnus Hagander 2007-02-11 11:59:26 +00:00
  • 4d160018d2 Improve documentation for CREATE CONSTRAINT TRIGGER. Tom Lane 2007-02-10 20:43:59 +00:00
  • 933571129d Fix pg_standby to build on msvc. Magnus Hagander 2007-02-10 19:52:45 +00:00
  • 05f43970d3 Add proper mapping of boolean type data to XML Schema. Peter Eisentraut 2007-02-10 18:47:41 +00:00
  • 4ab8fcba8a StrNCpy -> strlcpy (not complete) Peter Eisentraut 2007-02-10 14:58:55 +00:00
  • 1a1474b4c0 Put back some not-so-unnecessary-as-all-that := usages. Per buildfarm. Tom Lane 2007-02-10 04:26:24 +00:00
  • 23b65b8063 Hm, seems my hack on rowtypes regression test has made its output row order platform-specific. Add an ORDER BY clause to stop buildfarm failures. Tom Lane 2007-02-10 04:18:32 +00:00
  • fc7de7c2cb Unbreak the SGML doc build: ":=" is needed to assign to variables if the RHS of the assignment expands to a reference to the LHS. Neil Conway 2007-02-09 20:40:13 +00:00
  • 6be40def01 Minor tweak to make rowtypes regression test run faster. We don't currently have any better strategy for this query than re-running the sub-select over and over; it seems unlikely that doing so 10000 times is a more useful test than doing it a few dozen times. Tom Lane 2007-02-09 20:17:59 +00:00
  • 6e1664beaf Remove useless CPPFLAGS. Peter Eisentraut 2007-02-09 17:24:33 +00:00
  • 994b1cb59e Add $PostgreSQL$ marker to contrib makefiles. Peter Eisentraut 2007-02-09 17:04:00 +00:00
  • f44271176e Call pgstat_drop_database during DROP DATABASE, so that any stats file entries for the victim database go away sooner rather than later. We already did the equivalent thing at the per-relation level, not sure why it's not been done for whole databases. With this change, pgstat_vacuum_tabstat should usually not find anything to do; though we still need it as a backstop in case DROPDB or TABPURGE messages get lost under load. Tom Lane 2007-02-09 16:12:19 +00:00
  • c138b966d4 Replace useless uses of := by = in makefiles. Peter Eisentraut 2007-02-09 15:56:00 +00:00
  • d7fee591db Remove blank lines in code. Bruce Momjian 2007-02-09 04:17:58 +00:00
  • bc6fb5436f Update FAQ for new 24-byte header, down from 28. Bruce Momjian 2007-02-09 03:43:22 +00:00
  • 1ad2f04bf2 Add blank line. Bruce Momjian 2007-02-09 03:39:59 +00:00
  • 9eddc28197 Add URL for: Bruce Momjian 2007-02-09 03:39:39 +00:00
  • 19d561cbd0 Done! Bruce Momjian 2007-02-09 03:37:45 +00:00
  • c398300330 Combine cmin and cmax fields of HeapTupleHeaders into a single field, by keeping private state in each backend that has inserted and deleted the same tuple during its current top-level transaction. This is sufficient since there is no need to be able to determine the cmin/cmax from any other transaction. This gets us back down to 23-byte headers, removing a penalty paid in 8.0 to support subtransactions. Patch by Heikki Linnakangas, with minor revisions by moi, following a design hashed out awhile back on the pghackers list. Tom Lane 2007-02-09 03:35:35 +00:00
  • acb3416686 Remove blank line from C code. Bruce Momjian 2007-02-09 03:15:48 +00:00
  • aba039df66 Update: < * Consider placing all sequences in a single table > * Consider placing all sequences in a single table, or create a system > view Bruce Momjian 2007-02-09 01:29:48 +00:00
  • 5bdf44c647 Update: Bruce Momjian 2007-02-09 00:34:31 +00:00
  • 18d36f9e19 Add: Bruce Momjian 2007-02-09 00:32:15 +00:00
  • 2737f304ca Add URL for: Bruce Momjian 2007-02-08 21:51:50 +00:00
  • d6c1e1682c Fix bug when localized to_char() day or month names were incorectly trnasformed to lower or upper string. Bruce Momjian 2007-02-08 20:33:54 +00:00
  • 4a30da1e7f Add missing #define for mingw, per Magnus. Tom Lane 2007-02-08 19:48:28 +00:00
  • 675a313b54 Fix an ancient logic error in plpgsql's exec_stmt_block: it thought it could get away with not (re)initializing a local variable if the variable is marked "isconst" and not "isnull". Unfortunately it makes this decision after having already freed the old value, meaning that something like Tom Lane 2007-02-08 18:38:31 +00:00
  • 6eb61d578f Rearrange use of plpgsql_add_initdatums() so that only the parsing of a DECLARE section needs to know about it. Formerly, everyplace besides DECLARE that created variables needed to do "plpgsql_add_initdatums(NULL)" to prevent those variables from being sucked up as part of a subsequent DECLARE block. This is obviously error-prone, and in fact the SQLSTATE/SQLERRM patch had failed to do it for those two variables, leading to the bug recently exhibited by Asif Ali Rehman: a DECLARE within an exception handler tried to reinitialize SQLERRM. Tom Lane 2007-02-08 18:38:28 +00:00
  • 7758560fd5 Fix an ancient logic error in plpgsql's exec_stmt_block: it thought it could get away with not (re)initializing a local variable if the variable is marked "isconst" and not "isnull". Unfortunately it makes this decision after having already freed the old value, meaning that something like Tom Lane 2007-02-08 18:38:19 +00:00
  • ad7ee8883b Rearrange use of plpgsql_add_initdatums() so that only the parsing of a DECLARE section needs to know about it. Formerly, everyplace besides DECLARE that created variables needed to do "plpgsql_add_initdatums(NULL)" to prevent those variables from being sucked up as part of a subsequent DECLARE block. This is obviously error-prone, and in fact the SQLSTATE/SQLERRM patch had failed to do it for those two variables, leading to the bug recently exhibited by Asif Ali Rehman: a DECLARE within an exception handler tried to reinitialize SQLERRM. Tom Lane 2007-02-08 18:38:16 +00:00
  • 36149aac15 Fix an ancient logic error in plpgsql's exec_stmt_block: it thought it could get away with not (re)initializing a local variable if the variable is marked "isconst" and not "isnull". Unfortunately it makes this decision after having already freed the old value, meaning that something like Tom Lane 2007-02-08 18:38:08 +00:00
  • 3e94cf51d7 Rearrange use of plpgsql_add_initdatums() so that only the parsing of a DECLARE section needs to know about it. Formerly, everyplace besides DECLARE that created variables needed to do "plpgsql_add_initdatums(NULL)" to prevent those variables from being sucked up as part of a subsequent DECLARE block. This is obviously error-prone, and in fact the SQLSTATE/SQLERRM patch had failed to do it for those two variables, leading to the bug recently exhibited by Asif Ali Rehman: a DECLARE within an exception handler tried to reinitialize SQLERRM. Tom Lane 2007-02-08 18:38:03 +00:00
  • d6e3ae48ef Fix an ancient logic error in plpgsql's exec_stmt_block: it thought it could get away with not (re)initializing a local variable if the variable is marked "isconst" and not "isnull". Unfortunately it makes this decision after having already freed the old value, meaning that something like Tom Lane 2007-02-08 18:37:55 +00:00