Commit Graph

19877 Commits

Author SHA1 Message Date
Tom Lane 58a02c9905 Add another ORDER BY to rules test to eliminate platform-specific
output ordering.
2005-03-26 02:14:43 +00:00
Tom Lane fccde77ecb Prevent to_char(interval) from dumping core on month-related formats
when a zero-month interval is given.  Per discussion with Karel.
Also, some desultory const-labeling of constant tables.  More could be
done along that line.
2005-03-26 00:41:31 +00:00
Bruce Momjian a7032690f9 Use 'cp' and 'chmod' in place of 'install' to install header files.
This reduces header file install from 8 seconds to 0.40 seconds.
2005-03-25 23:22:54 +00:00
Bruce Momjian e341a52037 Add
> 	o Do VACUUM FULL if table is nearly empty?
2005-03-25 23:13:22 +00:00
Tom Lane 73ed6d61bd Remove lazy_update_relstats; go back to having VACUUM just record the
actual number of unremoved tuples as pg_class.reltuples.  The idea of
trying to estimate a steady state condition still seems attractive, but
this particular implementation crashed and burned ...
2005-03-25 22:51:31 +00:00
Tom Lane adb1a6e95b Improve EXPLAIN ANALYZE to show the time spent in each trigger when
executing a statement that fires triggers.  Formerly this time was
included in "Total runtime" but not otherwise accounted for.
As a side benefit, we avoid re-opening relations when firing non-deferred
AFTER triggers, because the trigger code can re-use the main executor's
ResultRelInfo data structure.
2005-03-25 21:58:00 +00:00
Tom Lane 08890b407e Fix resource owner code to generate catcache and relcache leak warnings
when open references remain during normal cleanup of a resource owner.
This restores the system's ability to warn about leaks to what it was
before 8.0.  Not really a user-level bug, but helpful for development.
2005-03-25 18:30:28 +00:00
Bruce Momjian 6b7ef076b5 Have libpgport link before libpq so that PG client applications are more
immunte to changes in libpq's usage of pgport between major versions.
2005-03-25 18:17:14 +00:00
Tom Lane 410fede0dd Fix two bugs in change_owner_recurse_to_sequences: it was grabbing an
overly strong lock on pg_depend, and it wasn't closing the rel when done.
The latter bug was masked by the ResourceOwner code, which is something
that should be changed.
2005-03-25 18:04:34 +00:00
Tom Lane 6d3f74d801 Update and copy-edit description of privileges. 2005-03-25 16:38:58 +00:00
Tom Lane 519cef22bf Add missing min/max parameters to DefineCustomIntVariable() and
DefineCustomRealVariable().  Thomas Hallgren
2005-03-25 16:17:28 +00:00
Tom Lane 6e26c00297 Fix to_date to behave reasonably when CC and YY fields are both used.
Karel Zak
2005-03-25 16:08:40 +00:00
Tom Lane c90578a1d6 Make initialization of special trigger variables a little more readable.
Correct one mis-setting of freeval (which could at worst leak a few bytes
until the trigger exits, so it's no big deal).
2005-03-25 01:45:42 +00:00
Bruce Momjian 87a4f9b6a3 Print URL in printed output.. 2005-03-25 01:01:14 +00:00
Bruce Momjian 07ebb9fba9 Add URL of how to report bugs:
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
2005-03-25 00:51:04 +00:00
Tom Lane e6befdc9d1 Kerberos fixes from Magnus Hagander --- in theory Kerberos 5 auth
should work on Windows now.  Also, rename set_noblock to pg_set_noblock;
since it is included in libpq, the former name polluted application
namespace.
2005-03-25 00:34:31 +00:00
Tom Lane 46be09e91a Revert ill-conceived change of libpq linkage --- breaks ecpg. 2005-03-24 23:53:48 +00:00
Tom Lane 0dca4fcb0e array_map can't use the fn_extra field of the provided fcinfo struct as
its private storage, because that belongs to the function that it is
supposed to call.  Per report from Ezequiel Tolnay.
2005-03-24 21:50:38 +00:00
Bruce Momjian 8269ad4ffe Force PG client applications to link to non-shared libpgport before
linking to libpq.  This insulates applications from changes in libpq's
usage of libpgport functions.

Backpatched to 8.0.X.
2005-03-24 19:33:32 +00:00
Tom Lane 208ec47ba3 Tweak planner to use a minimum size estimate of 10 pages for a
never-yet-vacuumed relation.  This restores the pre-8.0 behavior of
avoiding seqscans during initial data loading, while still allowing
reasonable optimization after a table has been vacuumed.  Several
regression test cases revert to 7.4-like behavior, which is probably
a good sign.  Per gripes from Keith Browne and others.
2005-03-24 19:14:49 +00:00
Bruce Momjian 7604267de8 Set socket timer to 58 instead of 60 minutes for hour-old cleaners:
* Touch the socket and lock file at least every hour, to
         * ensure that they are not removed by overzealous /tmp-cleaning
         * tasks.  Set to 58 minutes so a cleaner never sees the
         * file as an hour old.
2005-03-24 18:16:17 +00:00
Tom Lane 7e1c6f177e Fix python regression testing script to bail out early if language
creation fails ... no point in running the tests.
2005-03-24 17:23:34 +00:00
Tom Lane 00aa8ed47a Adjust plpython to convert \r\n and \r to \n in Python scripts,
per recent discussion concluding that this is the Right Thing.  Add
regression test check for this behavior.  Michael Fuhr
2005-03-24 17:22:34 +00:00
Bruce Momjian 218705958a Touch postmaster log file every hour, rather than every 10 minutes, to
prevent complaints from laptop users who don't like their hard drives
starting up every 10 minutes.
2005-03-24 05:19:05 +00:00
Bruce Momjian 2104f9af87 Add:
<
> * Add GUC to issue notice about queries that use unjoined tables
2005-03-24 05:15:59 +00:00
Bruce Momjian b1f57d88f5 Change Win32 O_SYNC method to O_DSYNC because that is what the method
currently does.  This is now the default Win32 wal sync method because
we perfer o_datasync to fsync.

Also, change Win32 fsync to a new wal sync method called
fsync_writethrough because that is the behavior of _commit, which is
what is used for fsync on Win32.

Backpatch to 8.0.X.
2005-03-24 04:36:20 +00:00
Bruce Momjian 0275b3f783 Update INTERVAL items. 2005-03-24 03:50:24 +00:00
Tom Lane 0ca91482fa Add missing error checking in readdir() loops. 2005-03-24 02:11:20 +00:00
Bruce Momjian c58071a5d1 Change ANSI to ISO standard:
< * Add ANSI INTERVAL handling
> * Add ISo INTERVAL handling
< 	o Interpret syntax that isn't uniquely ANSI or PG, like '1:30' or
< 	  '1' as ANSI syntax, e.g. interpret '1:30' MINUTE TO SECOND as
> 	o Interpret syntax that isn't uniquely ISO or PG, like '1:30' or
> 	  '1' as ISO syntax, e.g. interpret '1:30' MINUTE TO SECOND as
649c649
< * Add pre-parsing phase that converts non-ANSI syntax to supported
> * Add pre-parsing phase that converts non-ISO syntax to supported
2005-03-24 02:11:06 +00:00
Neil Conway 50ce8ab9fc Revert changes to CREATE TRIGGER and ALTER TABLE ADD FOREIGN KEY locking,
per request from Tom.
2005-03-24 00:03:26 +00:00
Bruce Momjian 8abba63859 Update wording:
< 	o Process mixed ANSI/PG syntax, and round value to requested
< 	  precision or generate an error
< 	o Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
< 	  INTERVAL MONTH), and this should return '12 months'
194a191,194
> 	o Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
> 	  INTERVAL MONTH), and this should return '12 months'
> 	o Round or truncate values to the requested precision, e.g.
> 	  INTERVAL '11 months' AS YEAR should return one or zero
2005-03-23 22:57:02 +00:00
Bruce Momjian d5dd9dbbfe Update item on ambiguous INTERVAL syntax:
< 	o Add support for day-time syntax, INTERVAL '1 2:03:04'
> 	o Add support for day-time syntax, INTERVAL '1 2:03:04'
192c192,194
< 	o Interpret INTERVAL '1:30' MINUTE TO SECOND as '1 minute 30 seconds'
> 	o Interpret syntax that isn't uniquely ANSI or PG, like '1:30' or
> 	  '1' as ANSI syntax, e.g. interpret '1:30' MINUTE TO SECOND as
> 	  '1 minute 30 seconds'
2005-03-23 21:49:52 +00:00
Bruce Momjian a15699b9e0 Update ANSI INTERVAL section:
< * Add support for ANSI time INTERVAL syntax, INTERVAL '1 2:03:04' DAY TO SECOND
< * Add support for ANSI date INTERVAL syntax, INTERVAL '20-6' YEAR TO MONTH
< * Process mixed ANSI/PG INTERVAL syntax, and round value to requested precision
<
<   Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS INTERVAL
<   MONTH), and this should return '12 months'
<
< * Interpret INTERVAL '1:30' MINUTE TO SECOND as '1 minute 30 seconds'
> * Add ANSI INTERVAL handling
> 	o Add support for day-time syntax, INTERVAL '1 2:03:04'
> 	  DAY TO SECOND
> 	o Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH
> 	o Process mixed ANSI/PG syntax, and round value to requested
> 	  precision or generate an error
> 	o Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
> 	  INTERVAL MONTH), and this should return '12 months'
> 	o Interpret INTERVAL '1:30' MINUTE TO SECOND as '1 minute 30 seconds'
> 	o Support precision, CREATE TABLE foo (a INTERVAL MONTH(3))
2005-03-23 21:10:02 +00:00
Tom Lane 87ba04eeaf Add note about risks involved in replaying CREATE TABLESPACE commands
from WAL.  A couple other grammatical improvements too.
2005-03-23 19:38:53 +00:00
Bruce Momjian d27061a3ab Update numbers in example:
< * Add support for ANSI date INTERVAL syntax, INTERVAL '9-3' YEAR TO MONTH
> * Add support for ANSI date INTERVAL syntax, INTERVAL '20-6' YEAR TO MONTH
2005-03-23 17:05:22 +00:00
Bruce Momjian 70d782e64c Update:
< * Add support for ANSI date INTERVAL syntax, INTERVAL '1-2' YEAR TO MONTH
> * Add support for ANSI date INTERVAL syntax, INTERVAL '9-3' YEAR TO MONTH
2005-03-23 16:38:55 +00:00
Neil Conway f30c76ce8d Adjust CREATE TRIGGER and ALTER TABLE ... ADD FOREIGN KEY to acquire
ExclusiveLock rather than AccessExclusiveLock. This will allow concurrent
SELECT queries to proceed on the table. Per discussion with Andrew at
SuperNews.
2005-03-23 07:44:57 +00:00
Bruce Momjian ac323044cf Add:
> 	o Add MOVE to PL/pgSQL
2005-03-23 06:11:57 +00:00
Bruce Momjian f6c1f990ab Assign:
> 	o Update pg_dump and psql to use the new COPY libpq API (Christopher)
2005-03-23 05:50:58 +00:00
Bruce Momjian 9be9c1fb0c Add:
>
> * Interpret INTERVAL '1:30' MINUTE TO SECOND as '1 minute 30 seconds'
2005-03-23 05:49:22 +00:00
Bruce Momjian 3113d38bec Add INTERVAL items:
> * Add support for ANSI time INTERVAL syntax, INTERVAL '1 2:03:04' DAY TO SECOND
> * Add support for ANSI date INTERVAL syntax, INTERVAL '1-2' YEAR TO MONTH
> * Process mixed ANSI/PG INTERVAL syntax, and round value to requested precision
184a188,189
>   Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS INTERVAL
>   MONTH), and this should return '12 months'
2005-03-23 05:42:40 +00:00
Bruce Momjian e96ab26277 Remove duplicate:
< * Allow a warm standby system to also allow read-only queries
2005-03-23 02:50:56 +00:00
Bruce Momjian b7c2258833 Add:
> * Allow WAL replay of CREATE TABLESPACE to work when the directory
>   structure on the recovery computer is different from the original
2005-03-23 02:49:42 +00:00
Bruce Momjian 0b2adc1e5f Add:
> 	o Update pg_dump and psql to use the new COPY libpq API
2005-03-23 02:41:29 +00:00
Bruce Momjian 09c165e41e Remove:
< 	o Update to use the newer COPY syntax
2005-03-23 02:21:01 +00:00
Bruce Momjian ee10720834 Add for pg_dump:
> 	o Update to use the newer COPY syntax
2005-03-23 02:14:11 +00:00
Bruce Momjian aab0159cfb Add:
>
> * Support table partitioning that allows a single table to be stored
>   in subtables that are partitioned based on the primary key or a WHERE
>   clause
2005-03-23 01:25:07 +00:00
Bruce Momjian 4201ba2459 Remove:
<
< 	o Prevent conflicting SET options from being set
<
< 	  This requires a checking function to be called after the server
< 	  configuration file is read.
2005-03-23 00:36:14 +00:00
Tom Lane cad86e253b WAL must log CREATE and DROP DATABASE operations *without* using any
explicit paths, so that the log can be replayed in a data directory
with a different absolute path than the original had.  To avoid forcing
initdb in the 8.0 branch, continue to accept the old WAL log record
types; they will never again be generated however, and the code can be
dropped after the next forced initdb.  Per report from Oleg Bartunov.
We still need to think about what it really means to WAL-log CREATE
TABLESPACE commands: we more or less have to put the absolute path
into those, but how to replay in a different context??
2005-03-23 00:03:37 +00:00
Tom Lane bd9b4a9d46 Use InitFunctionCallInfoData() macro instead of MemSet in performance
critical places in execQual.  By Atsushi Ogawa; some minor cleanup by moi.
2005-03-22 20:13:09 +00:00