Commit Graph

24124 Commits

Author SHA1 Message Date
Tom Lane b39e91501c Improve hash join to discard input tuples immediately if they can't
match because they contain a null join key (and the join operator is
known strict).  Improves performance significantly when the inner
relation contains a lot of nulls, as per bug #2930.
2007-01-28 23:21:26 +00:00
Tom Lane 28c480e9ae Remove unnecessary checkpoint from PL regression tests. This was once
handy to prevent core dump files from disappearing, but it's useless now
because (a) we don't drop core in individual DB subdirectories anymore,
and (b) CREATE DATABASE forces an internal checkpoint anyway.
2007-01-28 21:17:32 +00:00
Neil Conway 74a1a2b8b1 Rename the uuid_t type to pg_uuid_t, to avoid a conflict with any
definitions of uuid_t that may be provided by the system headers. This
should hopefully fix the Win32 build problems reported by Magnus.
2007-01-28 20:25:38 +00:00
Andrew Dunstan cd47d0f781 Fix plpython MSVC build in non-debug mode. 2007-01-28 19:36:46 +00:00
Tom Lane 529a24a22b Remove some unnecessary conversion work in build_regtype_array(). 2007-01-28 19:05:35 +00:00
Tom Lane 2b8758a389 Repair oversight in creation of "append relations": we should set up
rel->tuples as well as rel->rows, since some estimation functions expect both
to be valid in every baserel.  Per report from Dave Dutcher.
2007-01-28 18:50:40 +00:00
Tom Lane 5681cde7b1 Make some small improvements in the accuracy of plpgsql's error location
reports; inspired by the misleading CONTEXT lines shown in recent bug report
from Stefan Kaltenbrunner.  Also, allow statement-type names shown in these
messages to be translated.
2007-01-28 17:58:13 +00:00
Andrew Dunstan 17c8493c64 Fix path problem in MSVC bison wrapper. per Joachim Wieland. 2007-01-28 16:29:37 +00:00
Neil Conway a534068e0e Add a new builtin type, "uuid". This implements a UUID type, similar to
that defined in RFC 4122. This patch includes the basic implementation,
plus regression tests. Documentation and perhaps some additional
functionality will come later. Catversion bumped.

Patch from Gevik Babakhani; review from Peter, Tom, and myself.
2007-01-28 16:16:54 +00:00
Tom Lane a8e0b66061 Fix up plpgsql's "simple expression" evaluation mechanism so that it behaves
safely in the presence of subtransactions.  To ensure that any ExprContext
shutdown callbacks are called at the right times, we have to have a separate
EState for each level of subtransaction.  Per "TupleDesc reference leak" bug
report from Stefan Kaltenbrunner.

Although I'm convinced the code is wrong as far back as 8.0, it doesn't seem
that there are any ways for the problem to really manifest before 8.2: AFAICS,
8.0 and 8.1 only use the ExprContextCallback mechanism to handle set-returning
functions, which cannot usefully be executed in a "simple expression" anyway.
Hence, no backpatch before 8.2 --- the risk of unforeseen breakage seems
to outweigh the chance of fixing something.
2007-01-28 16:15:49 +00:00
Tom Lane 76c7d2afee Drat, can't fit an additional argument into log_error. Is it worth an
sprintf pushup to be sure we can report something useful for out-of-range
exitstatus?
2007-01-28 07:29:32 +00:00
Tom Lane a9fa52504f Clean up broken usage of HAVE_DECL_SYS_SIGLIST and inconsistent/poorly
formatted error messages.
2007-01-28 06:32:03 +00:00
Bruce Momjian 91ed399517 Use autoconf build-in sys_siglist macro AC_DECL_SYS_SIGLIST, rather than
create our own.
2007-01-28 03:50:34 +00:00
Tom Lane 9bf559dee3 Add a delay at the start of the stats test, to let any prior stats
activity quiesce.  Possibly this will fix the large increase in
non-reproducible stats test failures we've noted since turning on
stats_row_level by default.
2007-01-28 03:02:31 +00:00
Tom Lane a053437d9e Dept of second thoughts: the IQ of estimate_array_length() needs to be
kept on par with that of scalararraysel(), else estimates that should
track might not.  Hence teach it about binary-compatible cases, too.
2007-01-28 02:53:34 +00:00
Bruce Momjian c2c0b318d8 Add signal.h for sys_siglist reference. 2007-01-28 02:33:09 +00:00
Tom Lane af18f6ad85 Fix scalararraysel() to cope with binary-compatible cases, such as text[]
versus varchar[].  This oversight probably explains Ryan Holmes' recent
complaint --- he was getting a generic selectivity estimate instead of
anything intelligent.
2007-01-28 01:37:38 +00:00
Bruce Momjian 82480fc254 Use sys_siglist[] to print out signal names for signal exits, rather
than just numbers.
2007-01-28 01:12:05 +00:00
Bruce Momjian 3ec7ae1b67 Modify SGML makefile to allow 'gmake draft' to build draft html ('draft'
is now a target, no longer a modifier).
2007-01-27 22:44:32 +00:00
Tom Lane 6cefacd7c8 Correct an old logic error in btree page splitting: when considering a split
exactly at the point where we need to insert a new item, the calculation used
the wrong size for the "high key" of the new left page.  This could lead to
choosing an unworkable split, resulting in "PANIC: failed to add item to the
left sibling" (or "right sibling") failure.  Although this bug has been there
a long time, it's very difficult to trigger a failure before 8.2, since there
was generally a lot of free space on both sides of a chosen split.  In 8.2,
where the user-selected fill factor determines how much free space the code
tries to leave, an unworkable split is much more likely.  Report by Joe
Conway, diagnosis and fix by Heikki Linnakangas.
2007-01-27 20:53:30 +00:00
Michael Meskes 0fe1c36757 Fixed expected files, so they are in sync with tests again. 2007-01-27 18:33:22 +00:00
Andrew Dunstan ee57938c0b remove unnecessary and now inaccurate cast which I should have removed with other old code. 2007-01-27 16:46:21 +00:00
Peter Eisentraut 915abb346a Reactivate libxml memory management via palloc, now that I think I've
classified the conditions under which this is safe to do (see source
code comment).
2007-01-27 14:50:51 +00:00
Peter Eisentraut d3be7fae11 Add trailing zero byte in Unicode codepoint conversion. 2007-01-27 11:48:31 +00:00
Bruce Momjian abbf860f72 Add:
> * Enforce typmod for function inputs, function results and parameters for
>   spi_prepare'd statements called from PLs
>
>   http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php
2007-01-27 03:25:49 +00:00
Bruce Momjian ddf569e3ed Add:
> * Consider having the background writer update the transaction status
>   hint bits before writing out the page
2007-01-27 02:29:32 +00:00
Bruce Momjian f77b1f05f5 Add:
>
> * Consider increasing NUM_CLOG_BUFFERS
2007-01-27 02:28:16 +00:00
Andrew Dunstan 175a242187 Allow args to spi_prepare to be standard type aliaes as well as those known in pg_type. Fixes bug #2917. Add some regression tests for these cases. 2007-01-27 01:55:57 +00:00
Bruce Momjian 27552ce540 Update installation wording for an upgrade to state that dump/restore
should not be done, per Peter.
2007-01-27 01:27:36 +00:00
Bruce Momjian adef25e5ea Control openjade draft-mode by variable DRAFT, rather than whether the
version tag is 'devel'.
2007-01-26 23:51:39 +00:00
Bruce Momjian f0fc95612d Update wording of installation when upgrading, to more clearly
distinguish major vs minor release upgrades.
2007-01-26 22:52:50 +00:00
Bruce Momjian 320abc3a95 Modify draft SGML instructions to use DRAFT=Y because recursion was
causing html to be called twice --- no way to exit the makefile after
the recursion returns.
2007-01-26 22:23:50 +00:00
Tom Lane 4355d214c2 On Windows, use pgwin32_waitforsinglesocket() instead of select() to wait for
input in the stats collector.  Our select() emulation is apparently buggy
for UDP sockets :-(.  This should resolve problems with stats collection
(and hence autovacuum) failing under more than minimal load.  Diagnosis
and patch by Magnus Hagander.

Patch probably needs to be back-ported to 8.1 and 8.0, but first let's
see if it makes the buildfarm happy...
2007-01-26 20:06:52 +00:00
Neil Conway 8ff2bccee3 Squelch some VC++ compiler warnings. Mark float literals with the "f"
suffix, to distinguish them from doubles. Make some function declarations
and definitions use the "const" qualifier for arguments consistently.
Ignore warning 4102 ("unreferenced label"), because such warnings
are always emitted by bison-generated code. Patch from Magnus Hagander.
2007-01-26 17:45:42 +00:00
Bruce Momjian 8924c56820 Update BSD/OS platform for 8.2. 2007-01-25 23:34:28 +00:00
Bruce Momjian 2e6d1e5f7a Add URL for shrinking tuple to just its headers:
>   http://archives.postgresql.org/pgsql-hackers/2007-01/msg01025.php
2007-01-25 22:25:53 +00:00
Bruce Momjian 70268b50dd Update Win32 exception comment. 2007-01-25 21:50:49 +00:00
Neil Conway 74b6f73bc2 Add a setlocal command to the beginning of build.bat. This is required
to deal with buildenv.bat properly, so that PATH (for example) doesn't
expand infintly. Per report from Joachim Wieland, patch from Magnus.
2007-01-25 19:48:33 +00:00
Michael Meskes a5a1506c96 Removed compiler warning due to unneeded unsigned declaration.
Removed regression test that triggers those libc precision bugs on some archs.
2007-01-25 16:45:25 +00:00
Bruce Momjian 167fa70a2e Update pg_dumpall -f option description. 2007-01-25 15:08:06 +00:00
Bruce Momjian c8bdd8ce88 Correction: temp_tablespaces was implemented by Albert Cervera Areny,
with cleanup by Jaime Casanova.
2007-01-25 15:05:15 +00:00
Bruce Momjian 0626a7d1b5 Reverse out use of Py_RETURN_TRUE in plpython, only supported in Python >=
2.3.
2007-01-25 14:52:23 +00:00
Peter Eisentraut 22bd156ff0 Various fixes in the logic of XML functions:
- Add new SQL command SET XML OPTION (also available via regular GUC) to
  control the DOCUMENT vs. CONTENT option in implicit parsing and
  serialization operations.

- Subtle corrections in the handling of the standalone property in
  xmlroot().

- Allow xmlroot() to work on content fragments.

- Subtle corrections in the handling of the version property in
  xmlconcat().

- Code refactoring for producing XML declarations.
2007-01-25 11:53:52 +00:00
Bruce Momjian 9597446d11 Done:
> 	o -Add a GUC variable to control the tablespace for temporary objects
2007-01-25 04:38:59 +00:00
Bruce Momjian 148ea5cbea Add GUC temp_tablespaces to provide a default location for temporary
objects.

Jaime Casanova
2007-01-25 04:35:11 +00:00
Bruce Momjian 5af6b2abe9 Properly detoast access to bytea field pg_trigger.tgargs. Old code
might cause server crash.

Backpatch to 8.2.X.
2007-01-25 04:17:46 +00:00
Bruce Momjian 251281767a Fix for plpython functions; return true/false for boolean,
rather than 1/0.  This helps when creating trigger functions that output
SQL.

Guido Goldstein
2007-01-25 04:08:51 +00:00
Bruce Momjian 6441288ec9 Add 'output file' option for pg_dumpall, especially useful for Win32,
where output redirection of child processes (pg_dump) doesn't work.

Dave Page
2007-01-25 03:30:43 +00:00
Bruce Momjian 1b7d863f1d Remove developers list from TODO list now that we have URLs to reference
discussions.

<
<
< ---------------------------------------------------------------------------
<
<
< Developers who have claimed items are:
< --------------------------------------
< * Alvaro is Alvaro Herrera <alvherre@dcc.uchile.cl>
< * Andrew is Andrew Dunstan <andrew@dunslane.net>
< * Bruce is Bruce Momjian <bruce@momjian.us> of EnterpriseDB
< * Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au> of
<     Family Health Network
< * D'Arcy is D'Arcy J.M. Cain <darcy@druid.net> of The Cain Gang Ltd.
< * David is David Fetter <david@fetter.org>
< * Fabien is Fabien Coelho <coelho@cri.ensmp.fr>
< * Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
< * Greg is Greg Sabino Mullane <greg@turnstep.com>
< * Jan is Jan Wieck <JanWieck@Yahoo.com> of Afilias, Inc.
< * Joe is Joe Conway <mail@joeconway.com>
< * Karel is Karel Zak <zakkr@zf.jcu.cz>
< * Magnus is Magnus Hagander <mha@sollentuna.net>
< * Marc is Marc Fournier <scrappy@hub.org> of PostgreSQL, Inc.
< * Matthew T. O'Connor <matthew@zeut.net>
< * Michael is Michael Meskes <meskes@postgresql.org> of Credativ
< * Neil is Neil Conway <neilc@samurai.com>
< * Oleg is Oleg Bartunov <oleg@sai.msu.su>
< * Pavel is Pavel Stehule <pavel.stehule@hotmail.com>
< * Peter is Peter Eisentraut <peter_e@gmx.net>
< * Philip is Philip Warner <pjw@rhyme.com.au> of Albatross Consulting Pty. Ltd.
< * Rod is Rod Taylor <pg@rbt.ca>
< * Simon is Simon Riggs <simon@2ndquadrant.com>
< * Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
< * Tatsuo is Tatsuo Ishii <ishii@sraoss.co.jp> of SRA OSS, Inc. Japan
< * Teodor is Teodor Sigaev <teodor@sigaev.ru>
< * Tom is Tom Lane <tgl@sss.pgh.pa.us> of Red Hat
2007-01-25 02:50:12 +00:00
Bruce Momjian 7aa09c5df5 Done:
< 	o Add -f to pg_dumpall
> 	o -Add -f to pg_dumpall
2007-01-25 02:48:06 +00:00