Commit Graph

22820 Commits

Author SHA1 Message Date
Teodor Sigaev 001d30ee6b Add support to GIN for =(anyarray,anyarray) operation 2006-07-11 19:49:14 +00:00
Bruce Momjian 6d57ed7797 Have pgrminclude process include files too. 2006-07-11 19:45:16 +00:00
Bruce Momjian 22269434a6 Add $CFLAGS support to pgrminclude. 2006-07-11 19:34:34 +00:00
Bruce Momjian 1ddbfa16a8 Move pgrminclude debug code to be more effective. 2006-07-11 19:31:29 +00:00
Bruce Momjian 108fe524a9 Improve shell script wrapping. 2006-07-11 19:30:05 +00:00
Bruce Momjian 01835c495c Add comments to pgrminclude. 2006-07-11 19:25:41 +00:00
Neil Conway 2fa7a041f3 Correct the description of the pg_get_viewdef() function. Do some nearby
SGML cleanup: sort table entries alphabetically.
2006-07-11 19:11:26 +00:00
Bruce Momjian ac230e7431 Alphabetically order reference to include files, "S"-"Z". 2006-07-11 18:26:11 +00:00
Bruce Momjian 0ff3461bcc Alphabetically order reference to include files, "N" - "S". 2006-07-11 17:26:59 +00:00
Bruce Momjian 3a534ade39 Alphabetically order reference to include files, "G" - "M". 2006-07-11 17:04:13 +00:00
Bruce Momjian 0031f99bfa Add URL of code presentation to developers FAQ. 2006-07-11 17:02:16 +00:00
Teodor Sigaev 234163649e GIN improvements
- Replace sorted array of entries in maintenance_work_mem to binary tree,
  this should improve create performance.
- More precisely calculate allocated memory, eliminate leaks
  with user-defined extractValue()
- Improve wordings in tsearch2
2006-07-11 16:55:34 +00:00
Bruce Momjian fa601357fb Sort reference of include files, "A" - "F". 2006-07-11 16:35:33 +00:00
Tom Lane c469aed1cb Remove no-longer-needed configure test for krb5_encrypt(), per Jim Gates. 2006-07-11 16:14:50 +00:00
Teodor Sigaev 4fe8ba63fe Fix bug corrupting query in gist consistent function.
Thank to Mario Weilguni <mweilguni@sime.com> to discover a bug.
2006-07-11 16:00:44 +00:00
Tom Lane c713683fd7 Reverse inclusion order of <ws2tcpip.h> and <winsock2.h>, per Dave Page. 2006-07-11 14:25:09 +00:00
Bruce Momjian b85a965f5f Allow each C include file to compile on its own by including any needed
header files.
2006-07-11 13:54:25 +00:00
Bruce Momjian 45a4309074 Add libpq include directory to script. 2006-07-11 02:01:24 +00:00
Tom Lane 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.
2006-07-10 22:10:39 +00:00
Bruce Momjian c5133e5920 Allow /contrib include files to compile on their own. 2006-07-10 22:06:11 +00:00
Bruce Momjian f0cd764723 Add #include code to prevent multiple inclusion. 2006-07-10 21:03:58 +00:00
Bruce Momjian 97c3fcd9b7 Move pthread-win32.h to /port, modify bcc/msvc makefiles. 2006-07-10 18:53:29 +00:00
Bruce Momjian b538215d5d Remove a few baby-C macros in fuzzystrmatch. Add a few missing includes. 2006-07-10 18:40:16 +00:00
Bruce Momjian d399f1b75e Improve compile line for tool. 2006-07-10 18:39:32 +00:00
Bruce Momjian 54485d9fdd Update usage documention for pginclude 2006-07-10 17:13:34 +00:00
Bruce Momjian f61f01f1a2 Add $CFLAGS handling to pgcompinclude. 2006-07-10 17:11:43 +00:00
Bruce Momjian 94a61ef757 Fix 'find' args for pgcompinclude tool. 2006-07-10 17:08:38 +00:00
Bruce Momjian ec3efa244b Update schema GRANT USAGE description. 2006-07-10 16:48:46 +00:00
Bruce Momjian bbd41aac44 Improve tool coding. 2006-07-10 16:45:44 +00:00
Alvaro Herrera 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.

We now force all databases to be vacuumed, even template ones.  A backend
noticing too old a database (meaning pg_database.datminxid is in danger of
falling behind Xid wraparound) will signal the postmaster, which in turn will
start an autovacuum iteration to process the offending database.  In principle
this is only there to cope with frozen (non-connectable) databases without
forcing users to set them to connectable, but it could force regular user
database to go through a database-wide vacuum at any time.  Maybe we should
warn users about this somehow.  Of course the real solution will be to use
autovacuum all the time ;-)

There are some additional improvements we could have in this area: for example
the vacuum code could be smarter about not updating pg_database for each table
when called by autovacuum, and do it only once the whole autovacuum iteration
is done.

I updated the system catalogs documentation, but I didn't modify the
maintenance section.  Also having some regression tests for this would be nice
but it's not really a very straightforward thing to do.

Catalog version bumped due to system catalog changes.
2006-07-10 16:20:52 +00:00
Bruce Momjian e627c9b9a6 Improve script by processing only C files. 2006-07-10 16:07:24 +00:00
Alvaro Herrera 7b96d337d0 Testing commit stuff 2006-07-10 15:50:02 +00:00
Bruce Momjian a07849df96 Test commit. 2006-07-10 15:44:31 +00:00
Alvaro Herrera 7029f97c32 Fix typo in comment. 2006-07-08 20:45:38 +00:00
Bruce Momjian dab42382f4 Add index information to /contrib/pgstattuple:
This is an extension of pgstattuple to query information from indexes.
It supports btree, hash and gist. Gin is not supported. It scans only
index pages and does not read corresponding heap tuples. Therefore,
'dead_tuple' means the number of tuples with LP_DELETE flag.

Also, I added an experimental feature for btree indexes. It checks
fragmentation factor of indexes. If an leaf has the right link on the
next adjacent page in the file, it is assumed to be continuous (not
fragmented). It will help us to decide when to REINDEX.

ITAGAKI Takahiro
2006-07-06 02:18:07 +00:00
Bruce Momjian 591e90a4d9 WIN32 fixes:
I take out patch for this as a promise. This is client-build support of
MS-VC6+.

Fix for different getaddrinfo structure ordering on Win32 for IPv6.

Hiroshi Saito
2006-07-06 02:12:32 +00:00
Bruce Momjian a7aa0b8189 Backpatch dbmirror fix for escape handling.
> Upstream confirmed my reply in the last mail in [1]: the complete
> escaping logic in DBMirror.pl is seriously screwew.
>
> [1] http://archives.postgresql.org/pgsql-bugs/2006-06/msg00065.php

I finally found some time to debug this, and I think I found a better
patch than the one you proposed. Mine is still hackish and is still a
workaround around a proper quoting solution, but at least it repairs
the parsing without introducing the \' quoting again.

I consider this a band-aid patch to fix the recent security update.
PostgreSQL gurus, would you consider applying this until a better
solution is found for DBMirror.pl?

Olivier, can you please confirm that the patch works for you, too?

Backpatched to 8.0.X.

Martin Pitt
2006-07-06 01:57:25 +00:00
Bruce Momjian 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.

While at it, fix a function declaration in plpython that didn't match
the implementation (volatile missing).

Magnus Hagander
2006-07-06 01:55:51 +00:00
Bruce Momjian a77275fe3b Please find attached two patches for documentation and regression tests
for the usage of full time zone names.

Joachim Wieland
2006-07-06 01:46:38 +00:00
Michael Meskes 956cbeb7ef Fixed remaining Coverity bugs. 2006-07-05 10:49:56 +00:00
Tom Lane 2d0c1d3102 Documentation fixes for FILLFACTOR patch. Minor other editorialization. 2006-07-04 18:07:24 +00:00
Bruce Momjian 655787bfaf Modify:
< 	o -Add PQescapeIdentifier()
> 	o Add PQescapeIdentifierConn()
2006-07-04 13:22:41 +00:00
Bruce Momjian 3fafac3f62 Remove libpq's PQescapeIdentifier(), not safe from injection attacks. 2006-07-04 13:22:15 +00:00
Neil Conway 530eab592c Fix typos in comments. 2006-07-04 04:35:49 +00:00
Tom Lane 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.

Documentation still needs work, though I did fix the omissions in
catalogs.sgml and indexam.sgml.
2006-07-03 22:45:41 +00:00
Tom Lane feed07350b Fix broken markup. 2006-07-03 16:43:14 +00:00
Neil Conway 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.

There is room for further improvement here, but this is at least
a step in the right direction.
2006-07-02 05:17:26 +00:00
Bruce Momjian 277807bd9e Add FILLFACTOR to CREATE INDEX.
ITAGAKI Takahiro
2006-07-02 02:23:23 +00:00
Bruce Momjian 5d5c1416bf Done:
> * -Add fillfactor to control reserved free space during index creation
2006-07-02 02:22:39 +00:00
Bruce Momjian ff3003e537 Done:
< 	o Add ALTER TABLE tab ADD/DROP INHERITS parent
<
< 	  This allows tables to be added/removed from an inheritance
< 	  hierarchy.  This is particularly useful for table partitioning.
< 	  http://archives.postgresql.org/pgsql-hackers/2006-05/msg00988.php
<
> 	o -Add ALTER TABLE tab INHERIT / NO INHERIT  parent
2006-07-02 01:59:46 +00:00