Commit Graph

24017 Commits

Author SHA1 Message Date
Peter Eisentraut 020841071b Clean up encoding issues in the xml type: In text mode, encoding
declarations are ignored and removed, in binary mode they are honored as
specified by the XML standard.
2007-01-18 13:59:11 +00:00
Tom Lane c81bfc244b Add a note pointing out that is_pseudo_constant_clause() doesn't check
for aggregates.  This is OK for current uses but could burn somebody
someday...
2007-01-17 17:25:52 +00:00
Tom Lane eddbf39756 Extend yesterday's patch so that the bgwriter is also told to forget
pending fsyncs during DROP DATABASE.  Obviously necessary in hindsight :-(
2007-01-17 16:25:01 +00:00
Neil Conway 530b10c719 Tweak the width_bucket() regression tests to avoid an unnecessary
dependency on the platform's floating point implementation. Per
report from Stefan Kaltenbrunner.
2007-01-17 16:19:08 +00:00
Bruce Momjian 3026e1765f Mark TODO item "autovacuum on by default" as completed. 2007-01-17 03:43:49 +00:00
Tom Lane 6d660587f6 Revise bgwriter fsync-request mechanism to improve robustness when a table
is deleted.  A backend about to unlink a file now sends a "revoke fsync"
request to the bgwriter to make it clean out pending fsync requests.  There
is still a race condition where the bgwriter may try to fsync after the unlink
has happened, but we can resolve that by rechecking the fsync request queue
to see if a revoke request arrived meanwhile.  This eliminates the former
kluge of "just assuming" that an ENOENT failure is okay, and lets us handle
the fact that on Windows it might be EACCES too without introducing any
questionable assumptions.  After an idea of mine improved by Magnus.

The HEAD patch doesn't apply cleanly to 8.2, but I'll see about a back-port
later.  In the meantime this could do with some testing on Windows; I've been
able to force it through the code path via ENOENT, but that doesn't prove that
it actually fixes the Windows problem ...
2007-01-17 00:17:21 +00:00
Neil Conway 7f58ed1a10 vcbuild updates from Magnus:
* After Markos patch, now builds pgcrypto without zlib again
* Updates README with xml info
* xml requires xslt and iconv
* disable unnecessary warning about __cdecl()
* Add a buildenv.bat called from all other bat files to set up things
like PATH for flex/bison. (Can't just set it before calling, doesn't
always work when building from the GUI)
2007-01-16 21:43:19 +00:00
Neil Conway cf57ef4e50 Implement width_bucket() for the float8 data type.
The implementation is somewhat ugly logic-wise, but I don't see an
easy way to make it more concise.

When writing this, I noticed that my previous implementation of
width_bucket() doesn't handle NaN correctly:

    postgres=# select width_bucket('NaN', 1, 5, 5);
     width_bucket
    --------------
                6
    (1 row)

AFAICS SQL:2003 does not define a NaN value, so it doesn't address how
width_bucket() should behave here. The patch changes width_bucket() so
that ereport(ERROR) is raised if NaN is specified for the operand or the
lower or upper bounds to width_bucket(). For float8, NaN is disallowed
for any of the floating-point inputs, and +/- infinity is disallowed
for the histogram bounds (but allowed for the operand).

Update docs and regression tests, bump the catversion.
2007-01-16 21:41:14 +00:00
Neil Conway da07c81fe3 Minor improvements to the TODO list. Add some URLs for some
existing TODO items, and re-add a TODO item for an "estimated
count" capability.
2007-01-16 20:58:38 +00:00
Tom Lane 6959cb5957 Fix incorrect permissions check in information_schema.key_column_usage view:
it was checking a pg_constraint OID instead of pg_class OID, resulting in
"relation with OID nnnnn does not exist" failures for anyone who wasn't
owner of the table being examined.  Per bug #2848 from Laurence Rowe.

Note: for existing 8.2 installations a simple version update won't fix this;
the easiest fix is to CREATE OR REPLACE this view with the corrected
definition.
2007-01-16 18:32:26 +00:00
Alvaro Herrera 10a5e3348e Enable autovacuum in the default configuration, per discussion. 2007-01-16 18:26:02 +00:00
Alvaro Herrera eb63cc3da8 Arrange for autovacuum to be killed when another operation wants to be alone
accessing it, like DROP DATABASE.  This allows the regression tests to pass
with autovacuum enabled, which open the gates for finally enabling autovacuum
by default.
2007-01-16 13:28:57 +00:00
Neil Conway 02609893da Correct a minor inaccuracy in the pg_dumpall reference page: -g dumps
roles and tablespaces, no longer users and groups. Per Dave Page.

Backport to 8.2 and 8.1.
2007-01-15 17:22:46 +00:00
Teodor Sigaev f2a01b0d5a Fix localization support for multibyte encoding and C locale.
Slightly reworked patch from Tatsuo Ishii
2007-01-15 15:16:28 +00:00
Neil Conway 7021d6f6c8 Add a note to the docs describing NaN's equality and ordering behavior.
Per recent -hackers thread, this is noteworthy because Postgres behaves
differently from most implementations of NaN, including IEEE754.
2007-01-14 22:37:59 +00:00
Peter Eisentraut cb8906b354 Fix reverse compilation of IS DOCUMENT expression. 2007-01-14 21:39:24 +00:00
Alvaro Herrera a62e2c2b57 Replace unnecessary DISABLE_ZLIB define in pgcrypto with HAVE_LIBZ from core.
Patch from Marko Kreen.
2007-01-14 20:55:14 +00:00
Peter Eisentraut 2f8f76bcd5 Add support for xmlval IS DOCUMENT expression. 2007-01-14 13:11:54 +00:00
Bruce Momjian 62c06186f5 Remove completed items, and the last is unwanted:
< 		o Fix memory leak from exceptions
<
< 		  http://archives.postgresql.org/pgsql-performance/2006-06/msg00305.php
<
< * Allow constraint_exclusion to work for UNIONs like it does for
<   inheritance, allow it to work for UPDATE and DELETE statements, and allow
<   it to be used for all statements with little performance impact
<
< * Add estimated_count(*) to return an estimate of COUNT(*)
<
<   This would use the planner ANALYZE statistics to return an estimated
<   count.
<   http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php
2007-01-13 15:13:44 +00:00
Tom Lane 9a54b76b39 Fix handling of CC (century) format spec in to_date/to_char. According to
standard convention the 21st century runs from 2001-2100, not 2000-2099,
so make it work like that.  Per bug #2885 from Akio Iwaasa.

Backpatch to 8.2, but no further, since this is really a definitional
change; users of older branches are probably more interested in stability.
2007-01-12 23:34:55 +00:00
Peter Eisentraut 113fbe1264 Fix compiler warning 2007-01-12 22:09:49 +00:00
Peter Eisentraut 8b35795362 Use XML output escaping also in XMLFOREST. 2007-01-12 21:47:27 +00:00
Bruce Momjian 92dffbd029 Update to_char("CC") description. 2007-01-12 20:06:10 +00:00
Bruce Momjian a7ffd1a8b1 Update error messsage wording. 2007-01-12 19:34:41 +00:00
Bruce Momjian e6b054c0f5 Update ORDER BY UNION function/exprssion wording (again). 2007-01-12 19:23:38 +00:00
Tom Lane d83235415b Add some notes about the basic mathematical laws that the system presumes
hold true for operators in a btree operator family.  This is mostly to
clarify my own thinking about what the planner can assume for optimization
purposes.  (blowing dust off an old abstract-algebra textbook...)
2007-01-12 17:04:54 +00:00
Peter Eisentraut fc568b9d8f Allow for arbitrary data types as content in XMLELEMENT. The original
coercion to type xml was a mistake.  Escape values so they are valid
XML character data.
2007-01-12 16:29:24 +00:00
Michael Meskes 1b1c6ed70a Missed two new files from Joachim's patch. 2007-01-12 11:31:33 +00:00
Michael Meskes 89dad03f8b also adjust MinGW expected file to new setup
create expected file with correct port number
2007-01-12 11:27:28 +00:00
Michael Meskes b8f611cf4b Simplified regression handling
Added patch by Joachim to work around OpenBSD bug in regression suite.
2007-01-12 10:00:14 +00:00
Tom Lane 97903c3d94 Fix a performance problem in databases with large numbers of tables
(or other types of pg_class entry): the function pgstat_vacuum_tabstat,
invoked during VACUUM startup, had runtime proportional to the number of
stats table entries times the number of pg_class rows; in other words
O(N^2) if the stats collector's information is reasonably complete.
Replace list searching with a hash table to bring it back to O(N)
behavior.  Per report from kim at myemma.com.

Back-patch as far as 8.1; 8.0 and before use different coding here.
2007-01-11 23:06:03 +00:00
Bruce Momjian 87f6d64149 Update UNION/INTERSECT/EXCEPT ORDER BY error wording for
expressions/functions.
2007-01-11 20:04:50 +00:00
Bruce Momjian e2fe327013 Improve error wording of ORDER BY in UNION that uses new expressions in
ORDER BY.
2007-01-11 18:44:53 +00:00
Tom Lane ad429fe314 Teach nodeMergejoin how to handle DESC and/or NULLS FIRST sort orders.
So far only tested by hacking the planner ...
2007-01-11 17:19:13 +00:00
Michael Meskes 5b88b85cad Applied Joachim's patch for a --regression option.
Made this option mark the .c files, so the environment variable is no longer needed.
Created a special MinGW file with the special error message.
Do not print port into log file when running regression tests.
2007-01-11 15:47:34 +00:00
Bruce Momjian c0c00ac3b7 Add URL item for psql -c changes:
> 	  http://archives.postgresql.org/pgsql-hackers/2007-01/msg00291.php
2007-01-11 04:49:01 +00:00
Bruce Momjian 7b35db0620 Add:
> 	o Fix transaction restriction checks for CREATE DATABASE and
> 	  other commands
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-01/msg00133.php
2007-01-11 04:48:03 +00:00
Bruce Momjian f941a12426 Add URL for PQexec() for disallowing multiple queries:
> 	  http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php
2007-01-11 04:42:02 +00:00
Bruce Momjian 764160dc3d Add:
> 	o Extend timezone code to allow 64-bit values so we can
> 	  represent years beyond 2038
>
> 	  http://archives.postgresql.org/pgsql-hackers/2006-09/msg01363.php
>
2007-01-11 04:27:29 +00:00
Bruce Momjian cce09d62a5 Add:
> * Move NAMEDATALEN from postgres_ext.h to pg_config_manual.h and
>   consider making it more configurable in future releases
2007-01-11 03:01:01 +00:00
Bruce Momjian a5ec2ec77a Allow Borland CC to compile libpq and psql.
Backpatch to 8.2.X.

L Bayuk
2007-01-11 02:42:31 +00:00
Bruce Momjian 945d0b4b09 Allow Borland CC to compile libpq and psql.
L Bayuk
2007-01-11 02:39:52 +00:00
Bruce Momjian 7f1bc239c1 For pg_ctl -w, add reference to additional environment variables and pgpass. 2007-01-11 02:30:01 +00:00
Bruce Momjian ebdee66d5f Remove SGML makefile .SECONDARY tag so html rules will work properly;
Documentation/comment improvements.
2007-01-11 00:02:39 +00:00
Peter Eisentraut c0e977c18f Use libxml's xmlwriter API for producing XML elements, instead of doing
our own printing dance.  This does a better job of quoting and escaping the
values.
2007-01-10 20:33:54 +00:00
Bruce Momjian f21d5b61ce Improve SGML build rules for non-HTML output, per Peter. 2007-01-10 19:06:04 +00:00
Tom Lane c4e7e675d8 Make sure BYTE_ORDER gets defined in 64-bit builds on Solaris,
per Stefan Kaltenbrunner.
2007-01-10 18:22:50 +00:00
Tom Lane a191a169d6 Change the planner-to-executor API so that the planner tells the executor
which comparison operators to use for plan nodes involving tuple comparison
(Agg, Group, Unique, SetOp).  Formerly the executor looked up the default
equality operator for the datatype, which was really pretty shaky, since it's
possible that the data being fed to the node is sorted according to some
nondefault operator class that could have an incompatible idea of equality.
The planner knows what it has sorted by and therefore can provide the right
equality operator to use.  Also, this change moves a couple of catalog lookups
out of the executor and into the planner, which should help startup time for
pre-planned queries by some small amount.  Modify the planner to remove some
other cavalier assumptions about always being able to use the default
operators.  Also add "nulls first/last" info to the Plan node for a mergejoin
--- neither the executor nor the planner can cope yet, but at least the API is
in place.
2007-01-10 18:06:05 +00:00
Neil Conway 5f6d735356 Attached patch fixes two problems:
1) gendef works from inside visual studio - use a tempfile instead of
redirection, because for some reason you can't redirect dumpbin from
inside (patch from Joachim Wieland)
2) gendef must process only *.obj, or you get weird errors in some build
scenarios when it tries to process a logfile

Magnus Hagander
2007-01-10 04:02:05 +00:00
Neil Conway 840df5156a This patch enables verbose output when building all projects. This is
the same output level that was used when building a single project
before, and really needed to get reasonable information about what
happens (non-verbose just says "starting build of foo" and "done
building foo", more or less).

Magnus Hagander
2007-01-10 03:54:35 +00:00