users/bernd/postgres.git
18 years agoDocument that LDAP URLs should be double-quoted in pg_hba.conf because
Bruce Momjian [Sat, 24 Mar 2007 21:46:25 +0000 (21:46 +0000)]
Document that LDAP URLs should be double-quoted in pg_hba.conf because
commas are often present in the URL.

Backpatch to 8.2.X.

18 years agoFix broken markup.
Tom Lane [Sat, 24 Mar 2007 16:46:28 +0000 (16:46 +0000)]
Fix broken markup.

18 years agoFix parser bug on Windows with UTF8 encoding and C locale, the reason was
Teodor Sigaev [Thu, 22 Mar 2007 15:59:09 +0000 (15:59 +0000)]
Fix parser bug on Windows with UTF8 encoding and C locale, the reason was
sizeof(wchar_t) = 2 instead of 4.

18 years agoFix 8.2 breakage of domains over array types, and add a regression test case
Tom Lane [Mon, 19 Mar 2007 16:30:40 +0000 (16:30 +0000)]
Fix 8.2 breakage of domains over array types, and add a regression test case
to cover it.  Per report from Anton Pikhteryev.

18 years agoSPI_cursor_open failed to enforce that only read-only queries could be
Tom Lane [Sat, 17 Mar 2007 03:15:47 +0000 (03:15 +0000)]
SPI_cursor_open failed to enforce that only read-only queries could be
executed in read_only mode.  This could lead to various relatively-subtle
failures, such as an allegedly stable function returning non-stable results.
Bug goes all the way back to the introduction of read-only mode in 8.0.
Per report from Gaetano Mendola.

18 years agoFix uninitialized value in pgstatindex leading to invalid values being
Alvaro Herrera [Fri, 16 Mar 2007 15:06:46 +0000 (15:06 +0000)]
Fix uninitialized value in pgstatindex leading to invalid values being
reported in some cases.  Report and patch from Tatsuhito Kasahara.

Also fix a couple of other bugs I noticed in skimming the surrounding code.

18 years agoFix a longstanding bug in VACUUM FULL's handling of update chains. The code
Tom Lane [Wed, 14 Mar 2007 18:49:04 +0000 (18:49 +0000)]
Fix a longstanding bug in VACUUM FULL's handling of update chains.  The code
did not expect that a DEAD tuple could follow a RECENTLY_DEAD tuple in an
update chain, but because the OldestXmin rule for determining deadness is a
simplification of reality, it is possible for this situation to occur
(implying that the RECENTLY_DEAD tuple is in fact dead to all observers,
but this patch does not attempt to exploit that).  The code would follow a
chain forward all the way, but then stop before a DEAD tuple when backing
up, meaning that not all of the chain got moved.  This could lead to copying
the chain multiple times (resulting in duplicate copies of the live tuple at
its end), or leaving dangling index entries behind (which, aside from
generating warnings from later vacuums, creates a risk of wrong query
results or bogus duplicate-key errors once the heap slot the index entry
points to is repopulated).

The fix is to recheck HeapTupleSatisfiesVacuum while following a chain
forward, and to stop if a DEAD tuple is reached.  Each contiguous group
of RECENTLY_DEAD tuples will therefore be copied as a separate chain.
The patch also adds a couple of extra sanity checks to verify correct
behavior.

Per report and test case from Pavan Deolasee.

18 years agoArrange to install a "posixrules" entry in our timezone database, so that
Tom Lane [Wed, 14 Mar 2007 17:38:15 +0000 (17:38 +0000)]
Arrange to install a "posixrules" entry in our timezone database, so that
POSIX-style timezone specs that don't exactly match any database entry will
be treated as having correct USA DST rules.  Also, document that this can
be changed if you want to use some other DST rules with a POSIX zone spec.

We could consider changing localtime.c's TZDEFRULESTRING, but since that
facility can only deal with one DST transition rule, it seems fairly useless
now; might as well just plan to override it using a "posixrules" entry.

Backpatch as far as 8.0.  There isn't much we can do in 7.x ... either your
libc gets it right, or it doesn't.

18 years agoFix a race condition that caused pg_database_size() and pg_tablespace_size()
Alvaro Herrera [Sun, 11 Mar 2007 06:44:11 +0000 (06:44 +0000)]
Fix a race condition that caused pg_database_size() and pg_tablespace_size()
to fail if an object was removed between calls to ReadDir() and stat().
Per discussion in pgsql-hackers.

http://archives.postgresql.org/pgsql-hackers/2007-03/msg00671.php

Bug report and patch by Michael Fuhr.

18 years agoRemove unsafe calling of WSAStartup and WSACleanup from DllMain. Move the
Magnus Hagander [Thu, 8 Mar 2007 19:27:48 +0000 (19:27 +0000)]
Remove unsafe calling of WSAStartup and WSACleanup from DllMain. Move the
inline cleanup call around so it will be called in the right order, and
be called on errors.

Per report from Tokuharu Yuzawa.

18 years agoFix vac_update_relstats to ensure it always sends a relcache inval message,
Tom Lane [Thu, 8 Mar 2007 17:03:43 +0000 (17:03 +0000)]
Fix vac_update_relstats to ensure it always sends a relcache inval message,
even if none of the fields in the pg_class row change.  This behavior is
necessary to ensure other backends flush rd_targblock values that might
point to truncated-away pages.  We got this right pre-8.2 but it was broken
by overoptimistic change to not write out the pg_class row if unchanged.
Per report from Pavan Deolasee.

18 years agoAthough cube is a varlena type, nowhere was a detoasting of cube's value, so
Teodor Sigaev [Wed, 7 Mar 2007 21:25:18 +0000 (21:25 +0000)]
Athough cube is a varlena type, nowhere was a detoasting of cube's value, so
fix it.  Add macroses DatumGetNDBOX, PG_GETARG_NDBOX and PG_RETURN_NDBOX.
Backpatch for 8.2 too.

Previous versions use version 0 calling conventions. And fmgr code detoast
values for user-defined functions.

18 years agoFix oversight in original coding of inline_function(): since
Tom Lane [Tue, 6 Mar 2007 22:45:23 +0000 (22:45 +0000)]
Fix oversight in original coding of inline_function(): since
check_sql_fn_retval allows binary-compatibility cases, the expression
extracted from an inline-able SQL function might have a type that is only
binary-compatible with the declared function result type.  To avoid possibly
changing the semantics of the expression, we should insert a RelabelType node
in such cases.  This has only been shown to have bad consequences in recent
8.1 and up releases, but I suspect there may be failure cases in the older
branches too, so patch it all the way back.  Per bug #3116 from Greg Mullane.

Along the way, fix an omission in eval_const_expressions_mutator: it failed
to copy the relabelformat field when processing a RelabelType.  No known
observable failures from this, but it definitely isn't intended behavior.

18 years agoFix miscalculation of stats collector's write delay, introduced in revision 1.117.
Tom Lane [Thu, 1 Mar 2007 20:07:02 +0000 (20:07 +0000)]
Fix miscalculation of stats collector's write delay, introduced in revision 1.117.

18 years agoFix markQueryForLocking() to work correctly in the presence of nested views.
Tom Lane [Thu, 1 Mar 2007 18:50:36 +0000 (18:50 +0000)]
Fix markQueryForLocking() to work correctly in the presence of nested views.
It has been wrong for this case since it was first written for 7.1 :-(
Per report from Pavel HanĂ¡k.

18 years agoBackported bug fix for #2956.
Michael Meskes [Tue, 27 Feb 2007 13:27:13 +0000 (13:27 +0000)]
Backported bug fix for #2956.

18 years agoUpdate Chinese FAQs to have two versions, a traditional Chinese version (Taiwan)
Bruce Momjian [Wed, 21 Feb 2007 16:42:43 +0000 (16:42 +0000)]
Update Chinese FAQs to have two versions, a traditional Chinese version (Taiwan)
and a Simplified version (China (PRC)).

Backpatch to 8.2.X.

Daojing.Zhou

18 years agoAdd files from parent branch HEAD:
branch-fixup [Wed, 21 Feb 2007 16:42:36 +0000 (16:42 +0000)]
Add files from parent branch HEAD:
doc/FAQ_chinese_simp
doc/FAQ_chinese_trad
doc/src/FAQ/FAQ_chinese_simp.html
doc/src/FAQ/FAQ_chinese_trad.html

18 years agoUpdate "encode" documentation to mention that 'escape' only changes null
Bruce Momjian [Tue, 20 Feb 2007 19:59:18 +0000 (19:59 +0000)]
Update "encode" documentation to mention that 'escape' only changes null
bytes and backslashes, remove "ASCII" mention.  Backpatch to 8.2.X.

18 years agoUpdate information_schema documentation to match system tables.
Bruce Momjian [Tue, 20 Feb 2007 18:47:34 +0000 (18:47 +0000)]
Update information_schema documentation to match system tables.
Backpatch to 8.2.X.

18 years agoMore clearly document that most PostgreSQL utilities support libpq
Bruce Momjian [Tue, 20 Feb 2007 18:11:17 +0000 (18:11 +0000)]
More clearly document that most PostgreSQL utilities support libpq
environment variables.  Backpatch to 8.2.X.

18 years agoSpell check on array patch.
Bruce Momjian [Tue, 20 Feb 2007 14:54:51 +0000 (14:54 +0000)]
Spell check on array patch.

18 years agoUpdate array slice documentation to be clearer.
Bruce Momjian [Tue, 20 Feb 2007 14:34:29 +0000 (14:34 +0000)]
Update array slice documentation to be clearer.

18 years agoComment-out documentation for IS OF because it doesn't conform to the
Bruce Momjian [Tue, 20 Feb 2007 14:05:02 +0000 (14:05 +0000)]
Comment-out documentation for IS OF because it doesn't conform to the
ISO SQL behavior. Backpatch removal to 8.2.X.

18 years agoDocument IS [NOT] OF, which was added in 7.3.
Bruce Momjian [Tue, 20 Feb 2007 00:25:16 +0000 (00:25 +0000)]
Document IS [NOT] OF, which was added in 7.3.

18 years agoUpdate PQfree() documentation to be clearer, backpatch to 8.2.X.
Bruce Momjian [Mon, 19 Feb 2007 22:06:30 +0000 (22:06 +0000)]
Update PQfree() documentation to be clearer, backpatch to 8.2.X.

18 years agoFix pg_dump on win32 to properly dump files larger than 2Gb when using
Magnus Hagander [Mon, 19 Feb 2007 15:05:21 +0000 (15:05 +0000)]
Fix pg_dump on win32 to properly dump files larger than 2Gb when using
binary dump formats.

18 years agoFix portal management code to support non-default command completion tags for
Tom Lane [Sun, 18 Feb 2007 19:49:30 +0000 (19:49 +0000)]
Fix portal management code to support non-default command completion tags for
portals using PORTAL_UTIL_SELECT strategy.  This is currently significant only
for FETCH queries, which are supposed to include a count in the tag.  Seems
it's been broken since 7.4, but nobody noticed before Knut Lehre.

18 years agoAdjust the definition of is_pushed_down so that it's always true for INNER
Tom Lane [Fri, 16 Feb 2007 20:57:26 +0000 (20:57 +0000)]
Adjust the definition of is_pushed_down so that it's always true for INNER
JOIN quals, just like WHERE quals, even if they reference every one of the
join's relations.  Now that we can reorder outer and inner joins, it's
possible for such a qual to end up being assigned to an outer join plan node,
and we mustn't have it treated as a join qual rather than a filter qual for
the node.  (If it were, the join could produce null-extended rows that it
shouldn't.)  Per bug report from Pelle Johansson.

18 years agoFix another problem in 8.2 changes that allowed "one-time" qual conditions to
Tom Lane [Fri, 16 Feb 2007 03:49:10 +0000 (03:49 +0000)]
Fix another problem in 8.2 changes that allowed "one-time" qual conditions to
be checked at plan levels below the top; namely, we have to allow for Result
nodes inserted just above a nestloop inner indexscan.  Should think about
using the general Param mechanism to pass down outer-relation variables, but
for the moment we need a back-patchable solution.  Per report from Phil Frost.

18 years agoRestructure code that is responsible for ensuring that clauseless joins are