Commit Graph

27964 Commits

Author SHA1 Message Date
Andrew Dunstan 30735adfe4 do not use unsetenv.c on mingw 2009-02-12 15:12:47 +00:00
Peter Eisentraut 71936fc5eb The Czech (cs_CZ) and Slovak (sk_SK) locales sort numbers after letters,
instead of vice versa.  Update the regression test expectations to support
that.  In the plpgsql test, adjust the test data so that this isn't an
issue.  In the char and varchar tests, add new expected files.
2009-02-12 15:11:44 +00:00
Peter Eisentraut c1c1886d82 Unset language-related locale settings in any case, otherwise psql will
speak in tongues and mess up the regression test diffs.
2009-02-12 13:26:03 +00:00
Bruce Momjian eee82d44bd Remove tabs from SGML. 2009-02-12 13:25:33 +00:00
Magnus Hagander b31d0719fb Don't call SetEnvironmentVariable() when removing an environment variable,
as this seems to crash on at least some versions of MingW. Our current usage
of this function does not require it, so it should be ok to ignore.
2009-02-12 12:53:34 +00:00
Tom Lane 6d1e361852 Change ALTER TABLE SET WITHOUT OIDS to rewrite the whole table to physically
get rid of the OID column.  This eliminates the problem discovered by Heikki
back in November that 8.4's suppression of "unnecessary" junk filtering in
INSERT/SELECT could lead to an Assert failure, or storing of oids into a table
that shouldn't have them if Asserts are off.  While that particular problem
could have been solved in other ways, it seems likely to be just a forerunner
of things to come if we continue to allow tables to contain rows that disagree
with the pg_class.relhasoids setting.  It's better to make this operation slow
than to sacrifice performance or risk bugs in more common code paths.

Also, add ALTER TABLE SET WITH OIDS to rewrite the table to add oids.
This was a bit more controversial, but in view of the very small amount of
extra code needed given the current ALTER TABLE infrastructure, it seems best
to eliminate the asymmetry in features.
2009-02-11 21:11:16 +00:00
Tom Lane 68d95f12e7 Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running
on AIX with a non-gcc compiler.  The previous coding would do this only if
CC was exactly "xlc"; which is a bad idea, as demonstrated by trouble report
from Mihai Criveti.
2009-02-11 20:02:40 +00:00
Alvaro Herrera 787020fd3d Improve psql \d+ to show TOAST reloptions too. Per complaint from
ITAGAKI Takahiro.
2009-02-11 19:12:04 +00:00
Peter Eisentraut 20a43b16b4 Only unset the locale environment when --no-locale is used (the way it was
presumably designed, but didn't act).  This allows running the temp install
tests in a non-C locale, thus exercising users' real environments better.
Document how to change locales for test runs.
2009-02-11 14:03:42 +00:00
Bruce Momjian 715ea2bf18 Clarify PQinitSSL() documentation to mention what the argument controls. 2009-02-11 04:08:47 +00:00
Peter Eisentraut 8b9dd6b5fd Support for KOI8U encoding 2009-02-10 19:29:39 +00:00
Peter Eisentraut 1cb54c2860 Remove the encoding *numbers* from the comments. They are useless, and
make maintenance harder.
2009-02-10 16:44:44 +00:00
Peter Eisentraut 06941da30b Add possibility to generate only some files, by passing command-line
arguments.
2009-02-10 16:36:55 +00:00
Bruce Momjian b79e374519 Update wording of how to prevent pg_dump from affecting statistics
collection.
2009-02-10 00:55:21 +00:00
Tom Lane 8205258fa6 Adopt Bob Jenkins' improved hash function for hash_any(). This changes the
contents of hash indexes (again), so bump catversion.

Kenneth Marshall
2009-02-09 21:18:28 +00:00
Alvaro Herrera 834a6da4f7 Update autovacuum to use reloptions instead of a system catalog, for
per-table overrides of parameters.

This removes a whole class of problems related to misusing the catalog,
and perhaps more importantly, gives us pg_dump support for the parameters.

Based on a patch by Euler Taveira de Oliveira, heavily reworked by me.
2009-02-09 20:57:59 +00:00
Bruce Momjian 57b10ebcd4 Fix spelling error in docs.
Erik Rijkers
2009-02-09 14:09:56 +00:00
Tom Lane 3d02cae310 Ensure that INSERT ... SELECT into a table with OIDs never copies row OIDs
from the source table.  This could never happen anyway before 8.4 because
the executor invariably applied a "junk filter" to rows due to be inserted;
but now that we skip doing that when it's not necessary, the case can occur.
Problem noted 2008-11-27 by KaiGai Kohei, though I misunderstood what he
was on about at the time (the opacity of the patch he proposed didn't help).
2009-02-08 18:02:27 +00:00
Bruce Momjian 053835d334 Document that LIMIT NULL is the same as no LIMIT clause. 2009-02-07 20:11:16 +00:00
Bruce Momjian 97072ad80c Remove documentation mention that hash indexes perform no better than
btree;  keep mention about missing WAL logging.

Kenneth Marshall
2009-02-07 20:05:44 +00:00
Bruce Momjian 0c0d652031 Uppercase CHECK mention in relchecks documentation mention. 2009-02-07 19:27:25 +00:00
Bruce Momjian e795b56322 ecpg requires libpq; add Makefile rules to require libpq to be built
first.

Alvaro Herrera
2009-02-07 17:17:34 +00:00
Bruce Momjian 952fe78a05 Properly wrap new pg_dump doc text. 2009-02-07 15:25:51 +00:00
Bruce Momjian ec48770e0c Update pg_constraint.conkey documentation description. 2009-02-07 15:00:27 +00:00
Bruce Momjian d54ae17b63 Document disabling the statistics collector pg_dump activity, and give a
bit more visibility to the PGOPTIONS environment variable supported by
libpq.

Bryce Nesbitt
2009-02-07 14:31:30 +00:00
Bruce Momjian 65b731bd9d Fix to_timestamp() to not require upper/lower case matching for meridian
designations (AM/PM).  Also separate out matching of a meridian with
periods (e.g. A.M.) and with those without.

Do the same for AD/BC.

Brendan Jurd
2009-02-07 14:16:46 +00:00
Heikki Linnakangas b75b66332a Fix obsolete comment. Zdenek Kotala 2009-02-07 10:49:36 +00:00
Peter Eisentraut a3a7d47275 Set column privileges to supported 2009-02-07 01:02:55 +00:00
Tom Lane c473d92351 Fix cost_mergejoin's failure to adjust for rescanning of non-unique merge join
keys when considering a semi or anti join.  This requires estimating the
selectivity of the merge qual as though it were a regular inner join condition.
To allow caching both that and the real outer-join-aware selectivity, split
RestrictInfo.this_selec into two fields.

This fixes one of the problems reported by Kevin Grittner.
2009-02-06 23:43:24 +00:00
Tom Lane c87c31f10b Ooops, forgot to update COPY reference page to mention column privileges. 2009-02-06 21:22:49 +00:00
Tom Lane 7449427a1e Clean up some loose ends from the column privileges patch: add
has_column_privilege and has_any_column_privilege SQL functions; fix the
information_schema views that are supposed to pay attention to column
privileges; adjust pg_stats to show stats for any column you have select
privilege on; and fix COPY to allow copying a subset of columns if the user
has suitable per-column privileges for all the columns.

To improve efficiency of some of the information_schema views, extend the
has_xxx_privilege functions to allow inquiring about the OR of a set of
privileges in just one call.  This is just exposing capability that already
existed in the underlying aclcheck routines.

In passing, make the information_schema views report the owner's own
privileges as being grantable, since Postgres assumes this even when the grant
option bit is not set in the ACL.  This is a longstanding oversight.

Also, make the new has_xxx_privilege functions for foreign data objects follow
the same coding conventions used by the older ones.

Stephen Frost and Tom Lane
2009-02-06 21:15:12 +00:00
Bruce Momjian 0274e1b949 Fix typo in docs. 2009-02-06 19:24:12 +00:00
Bruce Momjian 3d1a1eeddb Document ways to avoid libpq WSACleanup() overhead on Windows.
Andrew Chernow
2009-02-06 18:18:54 +00:00
Bruce Momjian 8c78f8e65c Add PL/PgSQL FOUND and GET DIAGNOSTICS support for RETURN QUERY
statement

Pavel Stehule
2009-02-05 15:25:49 +00:00
Michael Meskes 78cbd49826 Mixing long and int entries of a union only works on some architectures. 2009-02-05 08:28:47 +00:00
Tom Lane 244f649261 Fix an old corner-case error in match_unsorted_outer(): don't consider
the cheapest-total inner path as a new candidate while truncating the
sort key list, if it already matched the full sort key list.  This is
too much of a corner case to be worth back-patching, since it's unusual
for the cheapest total path to be sorted, and anyway no real harm is
done (except in JOIN_SEMI/ANTI cases where cost_mergejoin is a bit
broken at the moment).  But it wasn't behaving as intended, so fix it.
Noted while examining a test case from Kevin Grittner.  This error doesn't
explain his issue, but it does explain why "set enable_seqscan = off"
seemed to reproduce it for me.
2009-02-05 01:24:55 +00:00
Alvaro Herrera d1cf27a8ee Fix some SGML-compiler warnings on -wxml mode. 2009-02-04 21:30:41 +00:00
Bruce Momjian d8a30eca2e Update read committed documentation to better explain undesirable
behavior of concurrent commands in cases where rows are being added and
removed from matching query criteria.

Minor word-smithing.
2009-02-04 16:05:50 +00:00
Michael Meskes 649a1252b7 Added result checks for calls to gmtime(). 2009-02-04 08:51:10 +00:00
Michael Meskes 08ffa78483 Argh, wrong line copied again. 2009-02-03 08:55:45 +00:00
Michael Meskes efd019fc94 Fixed copy&paste mistake that made library use uninitialized variable. 2009-02-03 08:48:29 +00:00
Andrew Dunstan b5d23f28ce allow alternative names for tclsh used on Windows 2009-02-03 01:24:57 +00:00
Tom Lane 623cf5edec Add a failure check for syslogger's use of _beginthreadex(), and remove
unnecessary thread address output parameter, to make this code look more
like that in pg_restore.
2009-02-03 00:59:26 +00:00
Tom Lane c242502005 Document the longstanding behavior of LIMIT NULL and OFFSET NULL,
per gripe from David Wheeler that this was mentioned nowhere.
In passing, editorialize a bit on the description of the SQL:2008
equivalent syntax.
2009-02-02 20:42:57 +00:00
Tom Lane c401a5ce58 Fix plpgsql to not treat INSERT INTO as an INTO-variables clause anywhere
in the string, not just at the start.  Per bug #4629 from Martin Blazek.

Back-patch to 8.2; prior versions don't have the problem, at least not in
the reported case, because they don't try to recognize INTO in non-SELECT
statements.  (IOW, this is really fallout from the RETURNING patch.)
2009-02-02 20:25:38 +00:00
Andrew Dunstan 775f1b379e Provide for parallel restoration from a custom format archive. Each data and
post-data step is run in a separate worker child (a thread on Windows, a child
process elsewhere) up to the concurrent number specified by the new pg_restore
command-line --multi-thread | -m switch.

Andrew Dunstan, with some editing by Tom Lane.
2009-02-02 20:07:37 +00:00
Alvaro Herrera 3a5b773715 Allow reloption names to have qualifiers, initially supporting a TOAST
qualifier, and add support for this in pg_dump.

This allows TOAST tables to have user-defined fillfactor, and will also
enable us to move the autovacuum parameters to reloptions without taking
away the possibility of setting values for TOAST tables.
2009-02-02 19:31:40 +00:00
Michael Meskes 80f95a6500 When changing a regression test file one should also change the expected output file. 2009-02-02 16:54:28 +00:00
Michael Meskes 934eab7cd5 Set memory segment to '0', just to be sure. 2009-02-02 16:49:50 +00:00
Michael Meskes 2d3c691146 Fixed auto allocation for binary data types. 2009-02-02 16:14:06 +00:00