Commit Graph

29609 Commits

Author SHA1 Message Date
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
Bruce Momjian 7c55be792b Adjust max_standby_delay documentation to be clearer, and mention that
two adjacent long-running queries have much less than max_standby_delay
before query cancel is possible.
2010-03-02 23:38:17 +00:00
Andrew Dunstan 05028cc33f Add missing library and include dir for XSLT in MSVC builds 2010-03-02 22:02:31 +00:00
Bruce Momjian b098dbec0d Document the effect of max_standby_delay on increasing the delay of data
from master to slave, and discourage its use during slave/master
keep-xid-alive connections.
2010-03-02 21:18:59 +00:00
Peter Eisentraut 9393bc62c5 Update keywords list for 9.0 2010-03-02 20:40:48 +00:00
Andrew Dunstan 4ab911da74 Do not run regression tests for contrib/xml2 on MSVC unless building with XML 2010-03-02 17:06:51 +00:00
Tom Lane 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
Andrew Dunstan 5600aaccbd Add XSLT defines for MSVC builds 2010-03-02 12:29:14 +00:00
Heikki Linnakangas 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
Heikki Linnakangas 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
Tom Lane d6a6f8c6be Fix contrib/xml2 so regression test still works when it's built without libxslt.
This involves modifying the module to have a stable ABI, that is, the
xslt_process() function still exists even without libxslt.  It throws a
runtime error if called, but doesn't prevent executing the CREATE FUNCTION
call.  This is a good thing anyway to simplify cross-version upgrades.
2010-03-01 18:07:59 +00:00
Magnus Hagander 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
Tom Lane 1ecafd622e Buildfarm still unhappy, so I'll bet it's EACCES not EPERM. 2010-03-01 14:54:00 +00:00
Tom Lane a102090995 Remove xmlCleanupParser calls from contrib/xml2.
These are unnecessary and probably dangerous.  I don't see any immediate
risk situations in the core XML support or contrib/xml2 itself, but there
could be issues with external uses of libxml2, and in any case it's an
accident waiting to happen.
2010-03-01 05:16:35 +00:00
Greg Stark 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
Tom Lane 936c4af1c6 Fix up memory management problems in contrib/xml2.
Get rid of the code that attempted to funnel libxml2's memory allocations
into palloc.   We already knew from experience with the core xml datatype
that trying to do this is simply not reliable.  Unlike the core code, I
did not bother adding a lot of PG_TRY/PG_CATCH logic to try to ensure that
everything is cleaned up on error exit.  Hence, we might leak some memory
if one of these functions fails partway through.  Given the deprecated
status of this contrib module and the fact that errors partway through
the functions shouldn't be too common, it doesn't seem worth worrying about.

Also fix a separate bug in xpath_table, that it did the wrong things
if given a result tuple descriptor with less than 2 columns.  While
such a case isn't very useful in practice, we shouldn't fail or stomp
memory when it occurs.

Add some simple regression tests based on all the reported crash cases
that I have on hand.

This should be back-patched, but let's see if the buildfarm likes it first.
2010-02-28 21:31:57 +00:00
Greg Stark 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
Tom Lane a12333eed2 Assorted code cleanup for contrib/xml2. No change in functionality,
just make it a bit less ugly in places.
2010-02-28 19:51:37 +00:00
Bruce Momjian bd7246f65e Update complex locale example in the documentation. 2010-02-28 02:20:40 +00:00
Bruce Momjian 0ff1c3e547 *** empty log message *** 2010-02-28 02:19:47 +00:00
Michael Meskes d6166a5d7e Make sure ecpg uses the same header files in the same order as the backend. 2010-02-27 21:56:16 +00:00
Tom Lane 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
Bruce Momjian bf379837dc Back out unintended change to pg_locale.c. 2010-02-27 20:20:44 +00:00
Bruce Momjian 9295eea839 Document ATAPI FLUSH CACHE EXT. 2010-02-27 20:16:17 +00:00
Bruce Momjian c685b942e5 Document trace_recovery_messages() parameter as an enum, not string.
Fujii Masao
2010-02-27 14:46:05 +00:00
Heikki Linnakangas 7ab9305cc9 Document max_standby_delay=-1 option, now that it's allowed again. 2010-02-27 09:29:20 +00:00
Tom Lane 4ec700a8ec Entity-ify a few new uses of literal <, >, and &. 2010-02-27 04:29:44 +00:00
Tom Lane 5667a53b78 Undo some more pgindent breakage. Per buildfarm. 2010-02-27 03:55:52 +00:00
Bruce Momjian f7c93458a9 Use <> for libpq #include in example programs, per suggestion from Josh Berkus. 2010-02-27 03:41:34 +00:00
Bruce Momjian adfb444581 Document ATAPI drive flush command, and mention SSD drives. 2010-02-27 01:39:46 +00:00
Bruce Momjian 4b0f822c77 Suggest gmake installcheck-world for pgindent testing. 2010-02-26 18:00:15 +00:00
Bruce Momjian 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
Bruce Momjian 98c356c8ad Wording improvements to README. 2010-02-26 15:57:34 +00:00
Bruce Momjian 55d1402f61 Update pgindent docs to use maintainer-clean. 2010-02-26 15:42:36 +00:00
Bruce Momjian e0d4b9c66f Document why pgindent wants a fresh CVS checkout. 2010-02-26 13:50:34 +00:00
Bruce Momjian 17b5b9909b In vacuumdb --help, call analyze "statistics", not "hints". 2010-02-26 04:14:36 +00:00
Bruce Momjian 637611585b Call output file typedefs.list; update README. 2010-02-26 02:58:49 +00:00
Bruce Momjian ca8e3a51a0 Document pg_restore --jobs as a performance enhancement. 2010-02-26 02:31:52 +00:00
Bruce Momjian 4f96ddd1d3 Update pgindent instructions. 2010-02-26 02:11:52 +00:00