1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00
Commit Graph

23613 Commits

Author SHA1 Message Date
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
6fcd5010e2 Add checks for valid encoding of query strings passed to SPI by plperl. 2010-03-09 02:48:33 +00:00
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
6e2cf34ec1 Better test the content of the SQLSTATE string in ecpglib than the pointer. 2010-03-08 12:15:24 +00:00
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
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
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
43d07d63b1 Revert patch for --psqlrc=FILENAME in psql. 2010-03-07 17:02:34 +00:00
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
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
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
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
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
0ea0afa444 Add C comment about DDL changes possibly causing pg_dump errors. 2010-03-03 23:38:44 +00:00
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
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
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
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
3a8497892c Make iconv work like other optional libraries for MSVC. 2010-03-03 03:29:37 +00:00
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
05028cc33f Add missing library and include dir for XSLT in MSVC builds 2010-03-02 22:02:31 +00:00
4ab911da74 Do not run regression tests for contrib/xml2 on MSVC unless building with XML 2010-03-02 17:06:51 +00:00
e664969f0f Cause plpgsql to throw an error if "INTO rowtype_var" is followed by a comma.
Per bug #5352, this helps to provide a useful error message if the user
tries to do something presently unsupported, namely use a rowtype variable
as a member of a multiple-item INTO list.
2010-03-02 16:14:39 +00:00
5600aaccbd Add XSLT defines for MSVC builds 2010-03-02 12:29:14 +00:00
95c833b41f Fix translation of strings in psql \d output (translation in headers worked,
but not in cells).
2010-03-01 21:27:26 +00:00
93df658a01 Fix numericlocale psql option when used with a null string and latex and troff
formats; a null string must not be formatted as a numeric. The more exotic
formats latex and troff also incorrectly formatted all strings as numerics
when numericlocale was on.

Backpatch to 8.1 where numericlocale option was added.

This fixes bug #5355 reported by Andy Lester.
2010-03-01 20:55:45 +00:00
8373490607 It's clearly now pointless to do backwards compatible parsing of this,
since we released a version without it, so remove the comment that
says we might want to do that.
2010-03-01 16:02:01 +00:00
1ecafd622e Buildfarm still unhappy, so I'll bet it's EACCES not EPERM. 2010-03-01 14:54:00 +00:00
73632828ac add EPERM to the list of return codes to expect from opening directories based on Vista results 2010-03-01 00:04:06 +00:00
7d7db18a68 Second try at fsyncing directories in CREATE DATABASE. Let's see what the build farm says of opening directories read-only and ignoring EBADF from fsync of directories 2010-02-28 21:05:30 +00:00
d6166a5d7e Make sure ecpg uses the same header files in the same order as the backend. 2010-02-27 21:56:16 +00:00
4d17a2146c Insert a hack into get_float8_nan (both core and ecpg copies) to deal with
the fact that NetBSD/mips is currently broken, as per buildfarm member pika.

Also add regression tests to ensure that get_float8_nan and get_float4_nan
are exercised even on platforms where they are not needed by
float8in/float4in.

Zoltán Böszörményi and Tom Lane
2010-02-27 21:53:21 +00:00
bf379837dc Back out unintended change to pg_locale.c. 2010-02-27 20:20:44 +00:00
9295eea839 Document ATAPI FLUSH CACHE EXT. 2010-02-27 20:16:17 +00:00
5667a53b78 Undo some more pgindent breakage. Per buildfarm. 2010-02-27 03:55:52 +00:00
4b0f822c77 Suggest gmake installcheck-world for pgindent testing. 2010-02-26 18:00:15 +00:00
2cc6ff45f8 Revert pgindent changes to ecpg include files that are part of ecpg
regession test output, and update pgindent script to avoid them in the
future.
2010-02-26 17:07:55 +00:00
98c356c8ad Wording improvements to README. 2010-02-26 15:57:34 +00:00
55d1402f61 Update pgindent docs to use maintainer-clean. 2010-02-26 15:42:36 +00:00
e0d4b9c66f Document why pgindent wants a fresh CVS checkout. 2010-02-26 13:50:34 +00:00
17b5b9909b In vacuumdb --help, call analyze "statistics", not "hints". 2010-02-26 04:14:36 +00:00
637611585b Call output file typedefs.list; update README. 2010-02-26 02:58:49 +00:00
4f96ddd1d3 Update pgindent instructions. 2010-02-26 02:11:52 +00:00
65e806cba1 pgindent run for 9.0 2010-02-26 02:01:40 +00:00
16040575a0 Add pgindent typedefs file to CVS. 2010-02-26 01:55:35 +00:00
a8307560e0 Update pgindent instructions to avoid changes to flex output files. 2010-02-26 01:40:15 +00:00
99419d36f2 Allow predicate_refuted_by() to deduce that NOT A refutes A.
We had originally made the stronger assumption that NOT A refutes any B
if B implies A, but this fails in three-valued logic, because we need to
prove B is false not just that it's not true.  However the logic does
go through if B is equal to A.

Recognizing this limited case is enough to handle examples that arise when
we have simplified "bool_var = true" or "bool_var = false" to just "bool_var"
or "NOT bool_var".  If we had not done that simplification then the
btree-operator proof logic would have been able to prove that the expressions
were contradictory, but only for identical expressions being compared to the
constants; so handling identical A and B covers all the same cases.

The motivation for doing this is to avoid unexpected asymmetrical behavior
when a partitioned table uses a boolean partitioning column, as in today's
gripe from Dominik Sander.

Back-patch to 8.2, which is as far back as predicate_refuted_by attempts to
do anything at all with NOTs.
2010-02-25 20:59:53 +00:00
89ce2bfc13 Add C comment that do_to_timestamp() lacks error checking. 2010-02-25 18:36:14 +00:00
413d34be4e Add configuration parameter ssl_renegotiation_limit to control
how often we do SSL session key renegotiation. Can be set to
0 to disable renegotiation completely, which is required if
a broken SSL library is used (broken patches to CVE-2009-3555
a known cause) or when using a client library that can't do
renegotiation.
2010-02-25 13:26:16 +00:00
cd2b7d3c4d Fix streaming replication starting at the very first WAL segment.
Per complaint from Greg Stark.
2010-02-25 07:31:40 +00:00