Commit Graph

  • e0bb171960 Fix ALTER TABLE to check pre-existing NOT NULL constraints when rewriting a table. Otherwise a USING clause that yields NULL can leave the table violating its constraint (possibly there are other cases too). Per report from Alexander Pravking. Tom Lane 2006-07-10 22:10:47 +00:00
  • cb33de773d Fix ALTER TABLE to check pre-existing NOT NULL constraints when rewriting a table. Otherwise a USING clause that yields NULL can leave the table violating its constraint (possibly there are other cases too). Per report from Alexander Pravking. Tom Lane 2006-07-10 22:10:39 +00:00
  • c5133e5920 Allow /contrib include files to compile on their own. Bruce Momjian 2006-07-10 22:06:11 +00:00
  • f0cd764723 Add #include code to prevent multiple inclusion. Bruce Momjian 2006-07-10 21:03:58 +00:00
  • 97c3fcd9b7 Move pthread-win32.h to /port, modify bcc/msvc makefiles. Bruce Momjian 2006-07-10 18:53:29 +00:00
  • b538215d5d Remove a few baby-C macros in fuzzystrmatch. Add a few missing includes. Bruce Momjian 2006-07-10 18:40:16 +00:00
  • d399f1b75e Improve compile line for tool. Bruce Momjian 2006-07-10 18:39:32 +00:00
  • 54485d9fdd Update usage documention for pginclude Bruce Momjian 2006-07-10 17:13:34 +00:00
  • f61f01f1a2 Add $CFLAGS handling to pgcompinclude. Bruce Momjian 2006-07-10 17:11:43 +00:00
  • 94a61ef757 Fix 'find' args for pgcompinclude tool. Bruce Momjian 2006-07-10 17:08:38 +00:00
  • ec3efa244b Update schema GRANT USAGE description. Bruce Momjian 2006-07-10 16:48:46 +00:00
  • bbd41aac44 Improve tool coding. Bruce Momjian 2006-07-10 16:45:44 +00:00
  • d4cef0aa2a Improve vacuum code to track minimum Xids per table instead of per database. To this end, add a couple of columns to pg_class, relminxid and relvacuumxid, based on which we calculate the pg_database columns after each vacuum. Alvaro Herrera 2006-07-10 16:20:52 +00:00
  • e627c9b9a6 Improve script by processing only C files. Bruce Momjian 2006-07-10 16:07:24 +00:00
  • 7b96d337d0 Testing commit stuff Alvaro Herrera 2006-07-10 15:50:02 +00:00
  • a07849df96 Test commit. Bruce Momjian 2006-07-10 15:44:31 +00:00
  • 7029f97c32 Fix typo in comment. Alvaro Herrera 2006-07-08 20:45:38 +00:00
  • dab42382f4 Add index information to /contrib/pgstattuple: Bruce Momjian 2006-07-06 02:18:07 +00:00
  • 591e90a4d9 WIN32 fixes: Bruce Momjian 2006-07-06 02:12:32 +00:00
  • acf40f39be Fix dbmirror for new backslash escaping: Bruce Momjian 2006-07-06 02:03:00 +00:00
  • 24ccd11a6c Fix dbmirror for new backslash escaping: Bruce Momjian 2006-07-06 02:02:48 +00:00
  • 4587cd4280 Fix dbmirror for new backslash escaping: Bruce Momjian 2006-07-06 02:02:36 +00:00
  • fe204535a7 Backpatch dbmirror fix for escape handling. Bruce Momjian 2006-07-06 01:57:34 +00:00
  • a7aa0b8189 Backpatch dbmirror fix for escape handling. Bruce Momjian 2006-07-06 01:57:25 +00:00
  • 4f4d62a5b5 Attached patch is required ot build with the CRT that comes with Visual Studio 2005. Basically MS defined errcode in the headers with a typedef, so we have to #define it out of the way. Bruce Momjian 2006-07-06 01:55:51 +00:00
  • a77275fe3b Please find attached two patches for documentation and regression tests for the usage of full time zone names. Bruce Momjian 2006-07-06 01:46:38 +00:00
  • 33215c2b78 Fixed remaining Coverity bugs. Michael Meskes 2006-07-05 10:50:20 +00:00
  • bf1cd364b6 Fixed remaining Coverity bugs. Michael Meskes 2006-07-05 10:50:06 +00:00
  • 956cbeb7ef Fixed remaining Coverity bugs. Michael Meskes 2006-07-05 10:49:56 +00:00
  • 2d0c1d3102 Documentation fixes for FILLFACTOR patch. Minor other editorialization. Tom Lane 2006-07-04 18:07:24 +00:00
  • 655787bfaf Modify: Bruce Momjian 2006-07-04 13:22:41 +00:00
  • 3fafac3f62 Remove libpq's PQescapeIdentifier(), not safe from injection attacks. Bruce Momjian 2006-07-04 13:22:15 +00:00
  • 530eab592c Fix typos in comments. Neil Conway 2006-07-04 04:35:49 +00:00
  • b7b78d24f7 Code review for FILLFACTOR patch. Change WITH grammar as per earlier discussion (including making def_arg allow reserved words), add missed opt_definition for UNIQUE case. Put the reloptions support code in a less random place (I chose to make a new file access/common/reloptions.c). Eliminate header inclusion creep. Make the index options functions safely user-callable (seems like client apps might like to be able to test validity of options before trying to make an index). Reduce overhead for normal case with no options by allowing rd_options to be NULL. Fix some unmaintainably klugy code, including getting rid of Natts_pg_class_fixed at long last. Some stylistic cleanup too, and pay attention to keeping comments in sync with code. Tom Lane 2006-07-03 22:45:41 +00:00
  • feed07350b Fix broken markup. Tom Lane 2006-07-03 16:43:14 +00:00
  • 7fb9090ebf Do a pass of code review for the ALTER TABLE ADD INHERITS patch. Keep the read lock we hold on the table's parent relation until commit. Update equalfuncs.c for the new field in AlterTableCmd. Various improvements to comments, variable names, and error reporting. Neil Conway 2006-07-02 05:17:26 +00:00
  • 277807bd9e Add FILLFACTOR to CREATE INDEX. Bruce Momjian 2006-07-02 02:23:23 +00:00
  • 5d5c1416bf Done: Bruce Momjian 2006-07-02 02:22:39 +00:00
  • ff3003e537 Done: Bruce Momjian 2006-07-02 01:59:46 +00:00
  • 8c092781f4 ALTER TABLE ... ADD/DROPS INHERIT (actually INHERIT / NO INHERIT) Bruce Momjian 2006-07-02 01:58:36 +00:00
  • 08ccdf020e Fix oversight in planning for multiple indexscans driven by ScalarArrayOpExpr index quals: we were estimating the right total number of rows returned, but treating the index-access part of the cost as if a single scan were fetching that many consecutive index tuples. Actually we should treat it as a multiple indexscan, and if there are enough of 'em the Mackert-Lohman discount should kick in. Tom Lane 2006-07-01 22:07:23 +00:00
  • cffd89ca73 Revise the planner's handling of "pseudoconstant" WHERE clauses, that is clauses containing no variables and no volatile functions. Such a clause can be used as a one-time qual in a gating Result plan node, to suppress plan execution entirely when it is false. Even when the clause is true, putting it in a gating node wins by avoiding repeated evaluation of the clause. In previous PG releases, query_planner() would do this for pseudoconstant clauses appearing at the top level of the jointree, but there was no ability to generate a gating Result deeper in the plan tree. To fix it, get rid of the special case in query_planner(), and instead process pseudoconstant clauses through the normal RestrictInfo qual distribution mechanism. When a pseudoconstant clause is found attached to a path node in create_plan(), pull it out and generate a gating Result at that point. This requires special-casing pseudoconstants in selectivity estimation and cost_qual_eval, but on the whole it's pretty clean. It probably even makes the planner a bit faster than before for the normal case of no pseudoconstants, since removing pull_constant_clauses saves one useless traversal of the qual tree. Per gripe from Phil Frost. Tom Lane 2006-07-01 18:38:33 +00:00
  • 8728d4aba9 Fix memory leak introduced in the prior commit, detected by Tom Lane. Alvaro Herrera 2006-06-30 16:55:41 +00:00
  • 68628fc38e Fix memory leak introduced in the prior commit, detected by Tom Lane. Alvaro Herrera 2006-06-30 16:55:35 +00:00
  • 55a39e0b0b Fix use-after-free error reported by Neil Conway. Alvaro Herrera 2006-06-30 15:06:16 +00:00
  • 78bfc22ee2 Fix use-after-free error reported by Neil Conway. Alvaro Herrera 2006-06-30 15:06:05 +00:00
  • 569e32a0f1 Update item for GUID: Bruce Momjian 2006-06-30 15:04:32 +00:00
  • 51e400c9c6 Remove the separate 'stats buffer' process, letting backend stats messages be delivered directly to the collector process. The extra process context swaps required to transfer data through the buffer process seem to outweigh any value the buffering might have. Per recent discussion and tests. I modified Bruce's draft patch to use poll() rather than select() where available (this makes a noticeable difference on my system), and fixed up the EXEC_BACKEND case. Tom Lane 2006-06-29 20:00:08 +00:00
  • cd4609e2a4 Change TRUNCATE's method for searching for foreign-key references so that the order in which it visits tables is not dependent on the physical order of pg_constraint entries, and neither are the error messages it gives. This should correct recently-noticed instability in regression tests. Tom Lane 2006-06-29 16:07:29 +00:00
  • bc9b6c22d5 Change URL for SITC: Bruce Momjian 2006-06-29 03:04:59 +00:00
  • 994aa6a611 Add: Bruce Momjian 2006-06-29 01:33:36 +00:00
  • 4252f835ad Add missing #include directive: pg_constraint.h declares some functions whose prototypes include the "List" type, so it ought to include the list header file. Neil Conway 2006-06-28 22:11:01 +00:00
  • 711e0c63bb Fix typo in comment. Neil Conway 2006-06-28 22:05:37 +00:00
  • 6e9c974e43 Editorialization for the additions to the CREATE TABLE reference page made as part of the recent INCLUDING CONSTRAINTS patch. The text could stand further improvement, but this is at least a step in the right direction. Neil Conway 2006-06-28 22:01:52 +00:00
  • 06bd3dba80 Add URL for SITC Bruce Momjian 2006-06-28 21:05:22 +00:00
  • 1c1ecd5124 Improve planner estimates for size of tuple hash tables. Tom Lane 2006-06-28 20:04:38 +00:00
  • 485375a1c9 Fix hash aggregation to suppress unneeded columns from being stored in tuple hash table entries. This addresses the problem previously noted that use of a 'physical tlist' in the input scan node could bloat the hash table entries far beyond what the planner expects. It's a better answer than my previous thought of undoing the physical tlist optimization, because we can also remove columns that are needed to compute the aggregate functions but aren't part of the grouping column set. Tom Lane 2006-06-28 19:40:52 +00:00
  • cfc710312e Adjust TupleHashTables to use MinimalTuple format for contained tuples. Tom Lane 2006-06-28 17:05:49 +00:00
  • 15897332ed Update: Bruce Momjian 2006-06-28 15:39:32 +00:00
  • c2c4f3c30e Update Russian FAQ. Bruce Momjian 2006-06-28 13:10:18 +00:00
  • 783a73168b Forget to add new file :(( Teodor Sigaev 2006-06-28 12:08:35 +00:00
  • 1f7ef548ec Changes * new split algorithm (as proposed in http://archives.postgresql.org/pgsql-hackers/2006-06/msg00254.php) * possible call pickSplit() for second and below columns * add spl_(l|r)datum_exists to GIST_SPLITVEC - pickSplit should check its values to use already defined spl_(l|r)datum for splitting. pickSplit should set spl_(l|r)datum_exists to 'false' (if they was 'true') to signal to caller about using spl_(l|r)datum. * support for old pickSplit(): not very optimal but correct split * remove 'bytes' field from GISTENTRY: in any case size of value is defined by it's type. * split GIST_SPLITVEC to two structures: one for using in picksplit and second - for internal use. * some code refactoring * support of subsplit to rtree opclasses Teodor Sigaev 2006-06-28 12:00:14 +00:00
  • a1dc5c60bc Remove embedded newline in string literal --- seems to make newer gcc versions very unhappy, and shouldn't be there anyway. Tom Lane 2006-06-27 23:25:28 +00:00
  • 370a709c75 Add GUC update_process_title to control whether 'ps' display is updated for every command, default to on. Bruce Momjian 2006-06-27 22:16:44 +00:00
  • 69d0a15e2a Convert hash join code to use MinimalTuple format in tuple hash table and batch files. Should reduce memory and I/O demands for such joins. Tom Lane 2006-06-27 21:31:20 +00:00
  • 665c5e861a Default stats_command_string to 'on', now that its overhead is minimal. Bruce Momjian 2006-06-27 19:07:50 +00:00
  • 3c71244b74 Put #ifdef NOT_USED around posix_fadvise call. We may want to resurrect this someday, but right now it seems that posix_fadvise is immature to the point of being broken on many platforms ... and we don't have any benchmark evidence proving it's worth spending time on. Tom Lane 2006-06-27 18:59:17 +00:00
  • 33b4ad66c9 Revert patch, doesn't do what it should: Bruce Momjian 2006-06-27 18:35:05 +00:00
  • cdd5178c69 Extend the MinimalTuple concept to tuplesort.c, thereby reducing the per-tuple space overhead for sorts in memory. I chose to replace the previous patch that tried to write out the bare minimum amount of data when sorting on disk; instead, just dump the MinimalTuples as-is. This wastes 3 to 10 bytes per tuple depending on architecture and null-bitmap length, but the simplification in the writetup/readtup routines seems worth it. Tom Lane 2006-06-27 16:53:02 +00:00
  • e99507eaa1 Will revert in next patch more cleanly. Bruce Momjian 2006-06-27 16:42:00 +00:00
  • 0c99c0fecf Not done: Bruce Momjian 2006-06-27 16:39:27 +00:00
  • 60f46dee71 Fix typo. Tom Lane 2006-06-27 14:01:42 +00:00
  • 4ca74397b4 Clamp last_anl_tuples to n_live_tuples, in case we vacuum a table without analyzing, so that future analyze threshold calculations don't get confused. Also, make sure we correctly track the decrease of live tuples cause by deletes. Alvaro Herrera 2006-06-27 03:45:28 +00:00
  • 32ad0fc183 Clamp last_anl_tuples to n_live_tuples, in case we vacuum a table without analyzing, so that future analyze threshold calculations don't get confused. Also, make sure we correctly track the decrease of live tuples cause by deletes. Alvaro Herrera 2006-06-27 03:45:16 +00:00
  • dc2c25fc62 Add INCLUDING CONSTRAINTS to CREATE TABLE LIKE. Bruce Momjian 2006-06-27 03:43:20 +00:00
  • 62f2693688 Done: Bruce Momjian 2006-06-27 03:22:45 +00:00
  • 424b8e64c7 Disallow changing/dropping default expression of a SERIAL column Bruce Momjian 2006-06-27 03:21:55 +00:00
  • cc6dbbeefc Fix for recent Win32 pg_dump tar temp file patch. Bruce Momjian 2006-06-27 02:56:46 +00:00
  • ba4b9c0d8c Fix for recent Win32 pg_dump tar temp file patch. Bruce Momjian 2006-06-27 02:56:41 +00:00
  • 3f50ba27cf Create infrastructure for 'MinimalTuple' representation of in-memory tuples with less header overhead than a regular HeapTuple, per my recent proposal. Teach TupleTableSlot code how to deal with these. As proof of concept, change tuplestore.c to store MinimalTuples instead of HeapTuples. Future patches will expand the concept to other places where it is useful. Tom Lane 2006-06-27 02:51:40 +00:00
  • 837a7df8dd On Win32, use loop to create pg_dump temporary tar file in the current directory, not in device root, for permission reasons. Bruce Momjian 2006-06-27 01:17:05 +00:00
  • fe491fb9af On Win32, use loop to create pg_dump temporary tar file in the current directory, not in device root, for permission reasons. Bruce Momjian 2006-06-27 01:16:58 +00:00
  • 560feb474a Done: Bruce Momjian 2006-06-27 00:03:44 +00:00
  • 3b1790f987 Add PQescapeIdentifier() to libpq Bruce Momjian 2006-06-27 00:03:42 +00:00
  • 59a853e48b Fix blank line. Bruce Momjian 2006-06-26 23:53:14 +00:00
  • ecae3a9689 Add comment about the use of pg_config_paths.h. Bruce Momjian 2006-06-26 18:40:50 +00:00
  • ca0d2197ca Change the row constructor syntax (ROW(...)) so that list elements foo.* will be expanded to a list of their member fields, rather than creating a nested rowtype field as formerly. (The old behavior is still available by omitting '.*'.) This syntax is not allowed by the SQL spec AFAICS, so changing its behavior doesn't violate the spec. The new behavior is substantially more useful since it allows, for example, triggers to check for data changes with 'if row(new.*) is distinct from row(old.*)'. Per my recent proposal. Tom Lane 2006-06-26 17:24:41 +00:00
  • b48aeb5145 Added missing braces to prevent a segfault after usage of an undeclared cursor. Michael Meskes 2006-06-26 14:13:04 +00:00
  • 88f396e1cb Added missing braces to prevent a segfault after usage of an undeclared cursor. Michael Meskes 2006-06-26 14:12:42 +00:00
  • 4b98d423d7 Added missing braces to prevent a segfault after usage of an undeclared cursor. Michael Meskes 2006-06-26 14:12:02 +00:00
  • 6bf44d51ea Use Unix newlines, instead of DOS ones. Bruce Momjian 2006-06-26 13:04:05 +00:00
  • e56756e94e Use Unix line endings instead of DOS ones, per Magnus. Bruce Momjian 2006-06-26 12:59:44 +00:00
  • e2fee8cf6d Update include files to Unix newline format, per report from Magnus. Bruce Momjian 2006-06-26 12:52:12 +00:00
  • 217d543943 Update comment description of geo routines and move comment to more relevant location. Bruce Momjian 2006-06-26 12:32:42 +00:00
  • a503fd3634 Added some more coverity report patches send in by Joachim Wieland <joe@mcknight.de>. Michael Meskes 2006-06-26 09:20:30 +00:00
  • 1bdea12e5c Added some more coverity report patches send in by Joachim Wieland <joe@mcknight.de>. Michael Meskes 2006-06-26 09:20:19 +00:00
  • ea9ec780ed Added some more coverity report patches send in by Joachim Wieland <joe@mcknight.de>. Michael Meskes 2006-06-26 09:20:09 +00:00
  • bc28f58b8f Update my info: Bruce Momjian 2006-06-25 18:52:03 +00:00
  • 1f9acaf21d Tweak dynahash.c to avoid wasting memory space in non-shared hash tables. palloc() will normally round allocation requests up to the next power of 2, so make dynahash choose allocation sizes that are as close to a power of 2 as possible. Back-patch to 8.1 --- the problem exists further back, but a much larger patch would be needed and it doesn't seem worth taking any risks. Tom Lane 2006-06-25 18:29:56 +00:00
  • 2924ca6747 Tweak dynahash.c to avoid wasting memory space in non-shared hash tables. palloc() will normally round allocation requests up to the next power of 2, so make dynahash choose allocation sizes that are as close to a power of 2 as possible. Back-patch to 8.1 --- the problem exists further back, but a much larger patch would be needed and it doesn't seem worth taking any risks. Tom Lane 2006-06-25 18:29:49 +00:00