Commit Graph

29647 Commits

Author SHA1 Message Date
Tom Lane 324505af01 Update oidjoins regression test for 9.0. 2010-03-14 04:17:54 +00:00
Peter Eisentraut 66cac8feab Add some more structure and bits of information to PL/Python documentation 2010-03-13 20:55:05 +00:00
Bruce Momjian 54aaef8642 Revert all keepalive moves, reevaluate. 2010-03-13 16:56:37 +00:00
Bruce Momjian 3f10d21ecd Move more tcp keepalive macros to be consistent. 2010-03-13 16:40:38 +00:00
Bruce Momjian 45d9d90c83 Move TCP keepalive macro definition
Jaime Casanova
2010-03-13 15:35:46 +00:00
Bruce Momjian a6c1cea2b7 Add libpq warning message if the .pgpass-retrieved password fails.
Add ERRCODE_INVALID_PASSWORD sqlstate error code.
2010-03-13 14:55:57 +00:00
Peter Eisentraut 8b2ae44dc8 Update shared memory configuration information for Linux
In particular, the assertion that shmall is sufficiently sized by default
is slowly becoming untrue.
2010-03-13 11:00:19 +00:00
Bruce Momjian 5473df9eb7 Document what user name email symbols are supported by tsearch. 2010-03-13 03:09:04 +00:00
Bruce Momjian 89b0095ebd Allow underscores in tsearch email addressses, per RFC 5322 and report
by Dan O'Hara.

Patch by Teodor Sigaev
2010-03-13 00:41:58 +00:00
Bruce Momjian 66b82c20d9 Small adjustment by pgindent. 2010-03-13 00:40:43 +00:00
Bruce Momjian c24b2ef217 Re-add comma, oops. 2010-03-12 23:21:48 +00:00
Tom Lane 52e2b33a55 Add some logging code for unexpected cases in pgstat.c, particularly being
unable to read a stats file for reasons other than ENOENT, and having to reset
last_statrequest because it's later than current time in the collector.
Not clear if this will shed any light on the "pgstat wait timeout" business,
but it seems like a good idea in general.

In passing, do some message-style-police work on recently-added
pgstat_reset_shared_counters code.
2010-03-12 22:19:19 +00:00
Tom Lane d75f7a01bf Fix a commented-out block of code that pgindent didn't understand
properly; it's been making that comment uglier with each run.
2010-03-12 21:40:36 +00:00
Bruce Momjian cb08f6b688 Remove unnecessary comma in documentation. 2010-03-12 17:46:07 +00:00
Tom Lane 1f44a313bd Add missing reset of need_initialization in reloptions code.
This resulted in useless extra work during every call of parseRelOptions,
but no bad effects other than that.  Noted by Alvaro.
2010-03-11 21:47:19 +00:00
Tom Lane 924d6ed437 Modify psql's \d printout to fold exclusion constraints in with regular
indexes, rather than printing them twice.  Per my gripe when the exclusion
constraint feature was committed.
2010-03-11 21:29:32 +00:00
Tom Lane f4898c945f Sync timezone code with tzcode 2010c from the Olson group. This fixes some
corner cases that come up in certain timezones (apparently, only those with
lots and lots of distinct TZ transition rules, as far as I can gather from
a quick scan of their archives).  Per suggestion from Jeevan Chalke.

Back-patch to 8.4.  Possibly we need to push this into earlier releases
as well, but I'm hesitant to update them to the 64-bit tzcode without
more thought and testing.
2010-03-11 18:43:24 +00:00
Heikki Linnakangas e0f9e2b648 Fix bug in KnownAssignedXidsMany(). I saw this when looking at the
assertion failure reported by Erik Rijkers, but this alone doesn't explain
the failure.
2010-03-11 09:26:59 +00:00
Heikki Linnakangas daaeac88aa Fix comment which was apparently copy-pasted from another function. 2010-03-11 09:10:25 +00:00
Tom Lane e6555b436e Simplify a couple of pg_dump and psql \d queries about index constraints
by joining to pg_constraint.conindid, instead of the former technique of
joining indirectly through pg_depend.  This is much more straightforward
and probably faster as well.  I had originally desisted from changing these
queries when conindid was added because I was worried about losing
performance, but if we join on conrelid as well as conindid then the index
on conrelid can be used when pg_constraint is large.
2010-03-11 04:36:43 +00:00
Tom Lane 4df5c6c719 Update comment for pg_constraint.conindid to mention that it's used for
exclusion constraints.  Not sure how we managed to update the comment for
it in catalogs.sgml but miss this one.
2010-03-11 03:36:22 +00:00
Robert Haas 70aedc0c55 Fix incorrect comment about permissions checking being done in utility.c.
Noted while reviewing a patch from KaiGai Kohei.
2010-03-10 19:48:39 +00:00
Itagaki Takahiro 17d8de0e61 pg_start_backup() can use a share lock to lock ControlFileLock
instead of an exclusive lock.

The change is almost for code cleanup. Since there seems to be no
performance benefits from it, backports should not be needed.

Fujii Masao
2010-03-10 02:04:48 +00:00
Tom Lane 8c9a120f6b Preliminary release notes for releases 8.4.3, 8.3.10, 8.2.16, 8.1.20, 8.0.24,
7.4.28.
2010-03-10 01:58:11 +00:00
Tom Lane dac7a37dd3 Use SvROK(sv) rather than directly checking SvTYPE(sv) == SVt_RV in plperl.
The latter is considered unwarranted chumminess with the implementation,
and can lead to crashes with recent Perl versions.

Report and fix by Tim Bunce.  Back-patch to all versions containing the
questionable coding pattern.
2010-03-09 22:34:38 +00:00
Alvaro Herrera ff5ab91299 Update time zone data files to tzdata release 2010d: DST law changes in Fiji,
Samoa, Chile; corrections to recent changes in Paraguay and Bangladesh.
2010-03-09 14:27:28 +00:00
Michael Meskes 600be01e89 ecpg now adds a unique counter to its varchar struct definitions to make these definitions unique, too. It used to use the linenumber but in the rare case of two definitions in one line this was not unique. 2010-03-09 11:09:46 +00:00
Andrew Dunstan 6fcd5010e2 Add checks for valid encoding of query strings passed to SPI by plperl. 2010-03-09 02:48:33 +00:00
Bruce Momjian b989662bf1 Return proper exit code (3) from psql when ON_ERROR_STOP=on and
--single-transaction are both used and the failure happens in commit,
e.g. failed deferred trigger.  Also properly free BEGIN/COMMIT result
structures from --single-transaction.

Per report from Dominic Bevacqua
2010-03-08 23:03:00 +00:00
Magnus Hagander aa8eed3172 Add missing space in example.
Tim Landscheidt
2010-03-08 12:38:37 +00:00
Michael Meskes 6e2cf34ec1 Better test the content of the SQLSTATE string in ecpglib than the pointer. 2010-03-08 12:15:24 +00:00
Magnus Hagander 2a0dec7888 Require hostname to be set when using GSSAPI authentication. Without it,
the GSSAPI libraries crash.

Noted by Zdenek Kotala
2010-03-08 10:01:12 +00:00
Magnus Hagander 6c6ee75ad3 Disallow gssapi authentication on local connections, since it
requires a hostname to function.

Noted by Zdenek Kotala
2010-03-08 09:57:26 +00:00
Tom Lane 676b26dd9a Update time zone data files to tzdata release 2010c: DST law changes in
Bangladesh, Mexico, Paraguay.
2010-03-08 01:18:09 +00:00
Magnus Hagander 43d07d63b1 Revert patch for --psqlrc=FILENAME in psql. 2010-03-07 17:02:34 +00:00
Tom Lane 153012c7d1 Fix warning messages in restrict_and_check_grant() to include the column name
when warning about column-level privileges.  This is more useful than before
and makes the apparent duplication complained of by Piyush Newe not so
duplicate.  Also fix lack of quote marks in a related message text.

Back-patch to 8.4, where column-level privileges were introduced.

Stephen Frost
2010-03-06 23:10:42 +00:00
Magnus Hagander 66c2cc2ba9 Add --psqlrc=FILENAME parameter to psql, to process an explicitly named
file instead of ~/.psqlrc on startup.
2010-03-06 15:28:09 +00:00
Tom Lane b8b34b7b44 When reading pg_hba.conf and similar files, do not treat @file as an inclusion
unless (1) the @ isn't quoted and (2) the filename isn't empty.  This guards
against unexpectedly treating usernames or other strings in "flat files"
as inclusion requests, as seen in a recent trouble report from Ed L.
The empty-filename case would be guaranteed to misbehave anyway, because our
subsequent path-munging behavior results in trying to read the directory
containing the current input file.

I think this might finally explain the report at
http://archives.postgresql.org/pgsql-bugs/2004-05/msg00132.php
of a crash after printing "authentication file token too long, skipping",
since I was able to duplicate that message (though not a crash) on a
platform where stdio doesn't refuse to read directories.  We never got
far in investigating that problem, but now I'm suspicious that the trigger
condition was an @ in the flat password file.

Back-patch to all active branches since the problem can be demonstrated in all
branches except HEAD.  The test case, creating a user named "@", doesn't cause
a problem in HEAD since we got rid of the flat password file.  Nonetheless it
seems like a good idea to not consider quoted @ as a file inclusion spec,
so I changed HEAD too.
2010-03-06 00:45:49 +00:00
Michael Meskes 8eb81949a5 In case the connection magically disappears libecpg only returns an internal
error sqlstate. This change makes it return a correct value..
2010-03-05 13:57:09 +00:00
Heikki Linnakangas 3bdede3974 Fix IsBinaryCoercible to not confuse a cast using in/out functions
with binary compatibility.

Backpatch to 8.4 where INOUT casts were introduced.
2010-03-04 09:39:53 +00:00
Bruce Momjian 0ea0afa444 Add C comment about DDL changes possibly causing pg_dump errors. 2010-03-03 23:38:44 +00:00
Bruce Momjian ea066f87c3 Document that "Q" is ignored by to_date and to_timestamp. Add C comment
about the behavior.

Document that quotes in to_date, to_timestamp, to_number skip input
characters.
2010-03-03 22:28:42 +00:00
Tom Lane 61d75116a7 Fix a couple of places that would loop forever if attempts to read a stdio file
set ferror() but never set feof().  This is known to be the case for recent
glibc when trying to read a directory as a file, and might be true for other
platforms/cases too.  Per report from Ed L.  (There is more that we ought to
do about his report, but this is one easily identifiable issue.)
2010-03-03 20:31:09 +00:00
Heikki Linnakangas eb1c3b5e3b Fix pg_dump of ACLs of foreign servers. The command to grant/revoke
privileges of foreign servers is "GRANT ... ON *FOREIGN* SERVER ...".
2010-03-03 20:10:48 +00:00
Tom Lane 5e47403be3 Make contrib/xml2 use core xml.c's error handler, when available (that is,
in versions >= 8.3).  The core code is more robust and efficient than what
was there before, and this also reduces risks involved in swapping different
libxml error handler settings.

Before 8.3, there is still some risk of problems if add-on modules such as
Perl invoke libxml without setting their own error handler.  Given the lack
of reports I'm not sure there's a risk in practice, so I didn't take the
step of actually duplicating the core code into older contrib/xml2 branches.
Instead I just tweaked the existing code to ensure it didn't leave a dangling
pointer to short-lived memory when throwing an error.
2010-03-03 19:10:22 +00:00
Tom Lane 8bf14182cf Export xml.c's libxml-error-handling support so that contrib/xml2 can use it
too, instead of duplicating the functionality (badly).

I renamed xml_init to pg_xml_init, because the former seemed just a bit too
generic to be safe as a global symbol.  I considered likewise renaming
xml_ereport to pg_xml_ereport, but felt that the reference to ereport probably
made it sufficiently PG-centric already.
2010-03-03 17:29:45 +00:00
Andrew Dunstan 3a8497892c Make iconv work like other optional libraries for MSVC. 2010-03-03 03:29:37 +00:00
Bruce Momjian 8b420770b3 Fix SGML markup. 2010-03-03 03:23:12 +00:00
Bruce Momjian d859b17f0f Restructure CREATE FUNCTION "NOTES" section to be shorter; move items
into proper sections, per suggestion from Tom.
2010-03-03 03:14:08 +00:00
Tom Lane 77e0d7b3eb Instead of trying (and failing) to allow <<label>> at the end of a DECLARE
section, throw an error message saying explicitly that the label must go
before DECLARE.  Per investigation of a recent pgsql-novice question,
this code did not work as intended in any modern PG version, maybe not ever.
Allowing such a thing would only create ambiguity anyway, so it seems better
to remove it than fix it.
2010-03-03 01:53:17 +00:00