Commit Graph

1768 Commits

Author SHA1 Message Date
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Tom Lane cd55aa2e00 Fix two new-in-9.0 bugs in hstore.
There was an incorrect Assert in hstoreValidOldFormat(), which would cause
immediate core dumps when attempting to work with pre-9.0 hstore data,
but of course only in an assert-enabled build.

Also, ghstore_decompress() incorrectly applied DatumGetHStoreP() to a datum
that wasn't actually an hstore, but rather a ghstore (ie, a gist signature
bitstring).  That used to be harmless, but could now result in misbehavior
if the hstore format conversion code happened to trigger.  In reality,
since ghstore is not marked toastable (and doesn't need to be), this
function is useless anyway; we can lobotomize it down to returning the
passed-in pointer.

Both bugs found by Andrew Gierth, though this isn't exactly his proposed
patch.
2010-09-16 02:54:01 +00:00
Bruce Momjian c5d94a34fb Modify pg_upgrade to set/restore all environment variables related to
collation/encoding to match English when reading controldata.  This now
matches the English variable setting used by pg_regress.c.

Backpatch to 9.0.X.
2010-09-07 14:10:30 +00:00
Tom Lane e57cd3936f Make pg_archivecleanup log messages more consistent.
Erik Rijkers
2010-08-23 02:56:24 +00:00
Peter Eisentraut 3f11971916 Remove extra newlines at end and beginning of files, add missing newlines
at end of files.
2010-08-19 05:57:36 +00:00
Tom Lane a0b7b717a4 Add xml_is_well_formed, xml_is_well_formed_document, xml_is_well_formed_content
functions to the core XML code.  Per discussion, the former depends on
XMLOPTION while the others do not.  These supersede a version previously
offered by contrib/xml2.

Mike Fowler, reviewed by Pavel Stehule
2010-08-13 18:36:26 +00:00
Tom Lane 00f76dbffa Get rid of a bunch of dubious error handling code in pgbench by just erroring
out immediately on any out-of-memory condition.  It's rather pointless to
imagine that pgbench will be able to continue usefully after a malloc
failure, and in any case there were a number of unchecked mallocs.
2010-08-12 21:10:59 +00:00
Tom Lane 5a4e19abe6 Add the ability to compute per-statement latencies (ie, average execution
times) to pgbench.

Florian Pflug, reviewed by Greg Smith
2010-08-12 20:39:39 +00:00
Tom Lane c04fd1b9db Remove the arbitrary (and undocumented) limit on the number of parameter=value
pairs that can be handled by xslt_process().

There is much else to do here, but this patch seems useful in its own right
for as long as this code survives.

Pavel Stehule, reviewed by Mike Fowler
2010-08-10 23:02:00 +00:00
Robert Haas fd1843ff89 Standardize get_whatever_oid functions for other object types.
- Rename TSParserGetPrsid to get_ts_parser_oid.
- Rename TSDictionaryGetDictid to get_ts_dict_oid.
- Rename TSTemplateGetTmplid to get_ts_template_oid.
- Rename TSConfigGetCfgid to get_ts_config_oid.
- Rename FindConversionByName to get_conversion_oid.
- Rename GetConstraintName to get_constraint_oid.
- Add new functions get_opclass_oid, get_opfamily_oid, get_rewrite_oid,
  get_rewrite_oid_without_relid, get_trigger_oid, and get_cast_oid.

The name of each function matches the corresponding catalog.

Thanks to KaiGai Kohei for the review.
2010-08-05 15:25:36 +00:00
Robert Haas 90a391c645 Regression tests for new btree_gist "not equals" support.
Jeff Davis, with minor adjustments by me.
2010-08-03 19:53:20 +00:00
Robert Haas 57d9aefcaa Teach levenshtein() about multi-byte characters.
Based on a patch by, and further ideas from, Alexander Korotkov.
2010-08-02 23:20:23 +00:00
Robert Haas ad17ff95cf Add btree_gist support for searching on "not equals".
Jeff Davis, with slight editorialization by me.
2010-08-02 16:26:48 +00:00
Robert Haas 8a4dc94ca0 Make details of the Numeric representation private to numeric.c.
Review by Tom Lane.
2010-07-30 04:30:23 +00:00
Robert Haas 980341b3c2 Avoid using text_to_cstring() in levenshtein functions.
Operating directly on the underlying varlena saves palloc and memcpy
overhead, which testing shows to be significant.

Extracted from a larger patch by Alexander Korotkov.
2010-07-29 20:11:48 +00:00
Peter Eisentraut f0790a642c Remove wildly obsolete type attribute externallength from chkpass 2010-07-28 20:34:34 +00:00
Robert Haas 6d16902eda Add ssl_cipher() and ssl_version() functions to contrib/sslinfo.
Review by Dave Page.
2010-07-27 23:43:42 +00:00
Bruce Momjian 8af787ea24 Adjust check_for_isn_and_int8_passing_mismatch() so it is called for all
migrations.

Backpatch to 9.0.
2010-07-25 03:47:29 +00:00
Bruce Momjian f31b1fd7c1 Prevent pg_upgrade from migrating databases that use reg* data types
where the oid is not preserved by pg_upgrade (everything but pg_type).
Update documentation.

Per bug report from depstein@alliedtesting.com.
2010-07-25 03:28:32 +00:00
Robert Haas 0e22e08fe5 Make hstore regression tests independent of standard_conforming_strings.
Per buildfarm.
2010-07-20 01:22:52 +00:00
Bruce Momjian 4504a1bc01 On Win32, pg_upgrade cannot sent any server log output to the log file
because of file access limitations on that platform.
2010-07-13 20:03:32 +00:00
Bruce Momjian 477c01b00d Remove incorrect email address for pg_upgrade bug reports. 2010-07-13 18:14:14 +00:00
Bruce Momjian f87bd25f00 In pg_upgrade, report /bin directory checks independent of /data checks. 2010-07-13 18:09:55 +00:00
Bruce Momjian 804f96accb In pg_upgrade, prevent psql AUTOCOMMIT=off by not loading .psqlrc. 2010-07-13 15:56:53 +00:00
Bruce Momjian a0d7c5f689 Properly report errno/out-of-disk-space error from pg_upgrade when in
copy mode, per report from depstein@alliedtesting.com.

Patch suggestion from Magnus.

Backpatch to 9.0.X.
2010-07-09 16:51:23 +00:00
Bruce Momjian 239d769e7e pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
Tom Lane f9e9da6664 Fix a few single-file (MODULES, not MODULE_big) contrib makefiles that were
supposing that they should set SHLIB_LINK rather than LDFLAGS_SL.  Since these
don't go through Makefile.shlib that was a no-op on most platforms.  Also
regularize the few platform-specific Makefiles that did pay attention to
SHLIB_LINK: it seems that the real value of that is to pull in BE_DLLLIBS,
so do that instead.  Per buildfarm failures on cygwin.
2010-07-05 23:15:56 +00:00
Bruce Momjian da254e3d16 Make pg_upgrade copyrights just 2010, not 2010-2010. 2010-07-03 16:33:15 +00:00
Bruce Momjian de255a6eb1 Add copyrights to pg_upgrade and pg_upgrade_tools files, per Tom. 2010-07-03 16:25:01 +00:00
Bruce Momjian ccbe0c14e6 Add CVS tags to pg_upgrade and pg_upgrade_support files, per request
from Tom.
2010-07-03 14:23:14 +00:00
Robert Haas ce51747673 Remove hstore % text[] operator; use slice() function instead.
David Wheeler, with one small correction by me.
2010-07-02 20:36:49 +00:00
Tom Lane 600fc1dc9d Get rid of some more stuff that duplicates c.h or port.h. 2010-07-01 15:52:52 +00:00
Bruce Momjian 14bd1c3d9e Remove port.h prototypes from pg_upgrade.h, per report from Robert Haas. 2010-07-01 14:37:53 +00:00
Bruce Momjian c1b617987d Add username designations to all pg_upgrade utility calls that support it. 2010-06-23 20:04:50 +00:00
Bruce Momjian 601d1eeddc Fix pg_upgrade's use of pg_ctl on Win32 to not send command and sever
output to the same file, because it is impossible.

Also set user name for pg_dumpall in pg_upgrade.
2010-06-22 16:45:10 +00:00
Robert Haas 8327060dc2 Updated expected-output file for hstore.
This is an oversight in my previous patch to deprecate => as an operator
name.  Per buildfarm.
2010-06-22 12:54:22 +00:00
Robert Haas 31c47e53aa Rename hstore => text[] operator to %
This is not yet in any released version, so we still have the option to
change the name.  We may want to reserve the token => in a future release.
2010-06-18 03:52:03 +00:00
Tom Lane 449c73f466 Clean up pg_archivecleanup's error and logging output: put newlines in
sane places, make messages follow project's message style guidelines.

Also, avoid closedir(NULL).

Fujii Masao and Tom Lane
2010-06-17 17:31:27 +00:00
Bruce Momjian 1aa117506d Fix pg_upgrade to remove malloc(0) call. 2010-06-16 19:43:11 +00:00
Bruce Momjian 24cb6ab9af Fix storage of getopt() return, should be 'int', for pg_upgrade.
Steve Singer
2010-06-15 23:25:01 +00:00
Tom Lane c0989c67fa Change the interpretation of the primary_key_attnums parameter of
dblink_build_sql_insert() and related functions.  Now the column numbers
are treated as logical not physical column numbers.  This will provide saner
behavior in the presence of dropped columns; furthermore, if we ever get
around to allowing rearrangement of logical column ordering, the original
definition would become nearly untenable from a usability standpoint.
Per recent discussion of dblink's handling of dropped columns.
Not back-patched for fear of breaking existing applications.
2010-06-15 20:29:01 +00:00
Robert Haas b17129b589 Remove hstore's text[] => text[] operator.
This is not yet in any released version, so we still have the option to
backtrack.  Instead, document hstore(text[], text[]).  Per discussion.
2010-06-15 19:48:30 +00:00
Tom Lane 3b3706d2cf Fix dblink_build_sql_insert() and related functions to handle dropped
columns correctly.  In passing, get rid of some dead logic in the
underlying get_sql_insert() etc functions --- there is no caller that
will pass null value-arrays to them.

Per bug report from Robert Voinea.
2010-06-15 19:04:15 +00:00
Tom Lane 48a7245391 Consolidate and improve checking of key-column-attnum arguments for
dblink_build_sql_insert() and related functions.  In particular, be sure to
reject references to dropped and out-of-range column numbers.  The numbers
are still interpreted as physical column numbers, though, for backward
compatibility.

This patch replaces Joe's patch of 2010-02-03, which handled only some aspects
of the problem.
2010-06-15 16:22:19 +00:00
Bruce Momjian 8141523e35 Properly define pg_upgrade global variable, per bug report from Chris
Ruprecht on Mac (64 bit).
2010-06-15 02:08:01 +00:00
Tom Lane 6bbaa3148d Rearrange dblink's dblink_build_sql_insert() and related routines to open and
lock the target relation just once per SQL function call.  The original coding
obtained and released lock several times per call.  Aside from saving a
not-insignificant number of cycles, this eliminates possible race conditions
if someone tries to modify the relation's schema concurrently.  Also
centralize locking and permission-checking logic.

Problem noted while investigating a trouble report from Robert Voinea --- his
problem is still to be fixed, though.
2010-06-14 20:49:33 +00:00
Simon Riggs ca65f2190a Files for pg_archivecleanup 2010-06-14 16:19:24 +00:00
Simon Riggs 25fee5cfbd New contrib module for use as an archive_cleanup_command, or as a
standalone utility for removing files from archive.
2010-06-14 16:17:56 +00:00
Bruce Momjian 785c2acc12 Update pg_upgrade C comment about cwd. 2010-06-12 17:45:28 +00:00
Bruce Momjian 1dc7c796c9 Have pg_upgrade create its output files in the current directory, rather
than in a subdirectory of the $HOME directory, or $TMP in Windows.
2010-06-12 17:05:29 +00:00