Commit Graph

5594 Commits

Author SHA1 Message Date
Tom Lane 2e7a68896b Add aggsortop column to pg_aggregate, so that MIN/MAX optimization can
be supported for all datatypes.  Add CREATE AGGREGATE and pg_dump support
too.  Add specialized min/max aggregates for bpchar, instead of depending
on text's min/max, because otherwise the possible use of bpchar indexes
cannot be recognized.
initdb forced because of catalog changes.
2005-04-12 04:26:34 +00:00
Tom Lane 3803f24379 Fix broken markup. 2005-04-12 03:16:50 +00:00
Bruce Momjian 72fd559037 Update to XHTML. 2005-04-10 23:21:33 +00:00
Bruce Momjian 9427cceb07 Done:
< * Allow additional tables to be specified in DELETE for joins
> * -Allow additional tables to be specified in DELETE for joins
2005-04-09 04:07:03 +00:00
Bruce Momjian 0e2f88a6d5 We don't put URL's in ulink's because the URL is always generated, but
we can put words in ulink and the URL will still be printed.

per Peter
2005-04-09 03:52:43 +00:00
Neil Conway eb4b7a0b77 Change the default setting of "add_missing_from" to false. This has been
the long-term plan for this behavior for quite some time, but it is only
possible now that DELETE has a USING clause so that the user can join
other tables in a DELETE statement without relying on this behavior.
2005-04-08 00:59:59 +00:00
Tom Lane 26f831a950 Update and copy-edit release notes for 8.0.2. 2005-04-07 19:04:13 +00:00
Tom Lane e00ee88761 Allow plpgsql functions to omit RETURN command when the function returns
output parameters or VOID or a set.  There seems no particular reason to
insist on a RETURN in these cases, since the function return value is
determined by other elements anyway.  Per recent discussion.
2005-04-07 14:53:04 +00:00
Neil Conway 5c7c017b07 Minor documentation tweak. 2005-04-07 03:31:42 +00:00
Neil Conway f5ab0a14ea Add a "USING" clause to DELETE, which is equivalent to the FROM clause
in UPDATE. We also now issue a NOTICE if a query has _any_ implicit
range table entries -- in the past, we would only warn about implicit
RTEs in SELECTs with at least one explicit RTE.

As a result of the warning change, 25 of the regression tests had to
be updated. I also took the opportunity to remove some bogus whitespace
differences between some of the float4 and float8 variants. I believe
I have correctly updated all the platform-specific variants, but let
me know if that's not the case.

Original patch for DELETE ... USING from Euler Taveira de Oliveira,
reworked by Neil Conway.
2005-04-07 01:51:41 +00:00
Tom Lane 726220fb9f Adjust grammar for plpgsql's OPEN command so that a cursor can be
OPENed on non-SELECT commands such as EXPLAIN or SHOW (anything that
returns tuples is allowed).  This flexibility already existed for
bound cursors, but OPEN was artificially restricting what it would
take.  Per a gripe some months back.
2005-04-05 18:05:46 +00:00
Tom Lane fd97cf4df0 plpgsql does OUT parameters, as per my proposal a few weeks ago. 2005-04-05 06:22:17 +00:00
Tom Lane 2af664e7ce Fix broken markup. 2005-04-05 04:47:19 +00:00
Neil Conway dba561f94e Add a link to www.postgresql.org/download to the installation instructions.
From Robert Treat.
2005-04-04 05:12:32 +00:00
Bruce Momjian dfd33e2ff6 Fix release not typo. 2005-04-02 03:42:41 +00:00
Bruce Momjian 65d2624e04 Update release notes for 8.0.2. 2005-04-02 02:42:01 +00:00
Bruce Momjian 9e9724e8bd Fix wrong week returnded by date_trunc('week') for early dates in
January --- would return wrong year for 2005-01-01 and 2006-01-01.

per report from Robert Creager.

Backpatch to 8.0.X.
2005-04-01 14:25:23 +00:00
Tom Lane 47888fe842 First phase of OUT-parameters project. We can now define and use SQL
functions with OUT parameters.  The various PLs still need work, as does
pg_dump.  Rudimentary docs and regression tests included.
2005-03-31 22:46:33 +00:00
Bruce Momjian fd977434b3 Adjust SGML ulink tags to the URL is always displayed in our printed docs. 2005-03-31 03:54:38 +00:00
Neil Conway d4beb2636c Minor tweak to documentation. 2005-03-30 04:52:49 +00:00
Neil Conway 320f85a953 Fix typo. 2005-03-30 02:08:39 +00:00
Tom Lane 0f085f6e9d Add proallargtypes and proargmodes columns to pg_proc, as per my earlier
proposal for OUT parameter support.  The columns don't actually *do*
anything yet, they are just left NULLs.  But I thought I'd commit this
part separately as a fairly pure example of the tasks needed when adding
a column to pg_proc or one of the other core system tables.
2005-03-29 19:44:23 +00:00
Tom Lane 8c85a34a3b Officially decouple FUNC_MAX_ARGS from INDEX_MAX_KEYS, and set the
former to 100 by default.  Clean up some of the less necessary
dependencies on FUNC_MAX_ARGS; however, the biggie (FunctionCallInfoData)
remains.
2005-03-29 03:01:32 +00:00
Neil Conway 4f6f5db474 Add SPI_getnspname(), including documentation. 2005-03-29 02:53:53 +00:00
Tom Lane 70c9763d48 Convert oidvector and int2vector into variable-length arrays. This
change saves a great deal of space in pg_proc and its primary index,
and it eliminates the former requirement that INDEX_MAX_KEYS and
FUNC_MAX_ARGS have the same value.  INDEX_MAX_KEYS is still embedded
in the on-disk representation (because it affects index tuple header
size), but FUNC_MAX_ARGS is not.  I believe it would now be possible
to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet.
There are still a lot of vestigial references to FUNC_MAX_ARGS, which
I will clean up in a separate pass.  However, getting rid of it
altogether would require changing the FunctionCallInfoData struct,
and I'm not sure I want to buy into that.
2005-03-29 00:17:27 +00:00
Tom Lane bf3dbb5881 First steps towards index scans with heap access decoupled from index
access: define new index access method functions 'amgetmulti' that can
fetch multiple TIDs per call.  (The functions exist but are totally
untested as yet.)  Since I was modifying pg_am anyway, remove the
no-longer-needed 'rel' parameter from amcostestimate functions, and
also remove the vestigial amowner column that was creating useless
work for Alvaro's shared-object-dependencies project.
Initdb forced due to changes in pg_am.
2005-03-27 23:53:05 +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 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 6d3f74d801 Update and copy-edit description of privileges. 2005-03-25 16:38:58 +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
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
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
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