Commit Graph

7750 Commits

Author SHA1 Message Date
Tom Lane 23347231a5 Tweak the API for per-datatype typmodin functions so that they are passed
an array of strings rather than an array of integers, and allow any simple
constant or identifier to be used in typmods; for example
	create table foo (f1 widget(42,'23skidoo',point));
Of course the typmodin function has still got to pack this info into a
non-negative int32 for storage, but it's still a useful improvement in
flexibility, especially considering that you can do nearly anything if you
are willing to keep the info in a side table.  We can get away with this
change since we have not yet released a version providing user-definable
typmods.  Per discussion.
2007-06-15 20:56:52 +00:00
Bruce Momjian 7ced811d45 Update item:
< * Allow EXPLAIN output to be more easily processed by scripts
> * Allow EXPLAIN output to be more easily processed by scripts, perhaps XML
2007-06-13 21:38:00 +00:00
Magnus Hagander 1ad08a8e9a Update documentation of resultmap file format. 2007-06-12 17:49:12 +00:00
Tom Lane a9545b3aef Improve UPDATE/DELETE WHERE CURRENT OF so that they can be used from plpgsql
with a plpgsql-defined cursor.  The underlying mechanism for this is that the
main SQL engine will now take "WHERE CURRENT OF $n" where $n is a refcursor
parameter.  Not sure if we should document that fact or consider it an
implementation detail.  Per discussion with Pavel Stehule.
2007-06-11 22:22:42 +00:00
Tom Lane bdc71c2cb1 Minor wording improvement. 2007-06-11 15:08:32 +00:00
Bruce Momjian 5f2bda15eb Done:
< 	o Allow UPDATE/DELETE WHERE CURRENT OF cursor
<
< 	  This requires using the row ctid to map cursor rows back to the
< 	  original heap row. This become more complicated if WITH HOLD cursors
< 	  are to be supported because WITH HOLD cursors have a copy of the row
< 	  and no FOR UPDATE lock.
< 	  http://archives.postgresql.org/pgsql-hackers/2007-01/msg01014.php
<
> 	o -Allow UPDATE/DELETE WHERE CURRENT OF cursor
2007-06-11 01:51:50 +00:00
Tom Lane 6808f1b1de Support UPDATE/DELETE WHERE CURRENT OF cursor_name, per SQL standard.
Along the way, allow FOR UPDATE in non-WITH-HOLD cursors; there may once
have been a reason to disallow that, but it seems to work now, and it's
really rather necessary if you want to select a row via a cursor and then
update it in a concurrent-safe fashion.

Original patch by Arul Shaji, rather heavily editorialized by Tom Lane.
2007-06-11 01:16:30 +00:00
Alvaro Herrera 2b438c12cc Avoid passing zero as a value for vacuum_cost_limit, because it's not a valid
value for the vacuum code.  Instead, make zero signify getting the value from a
higher level configuration facility, just like -1 in the original coding.  We
still document that -1 is the value that disables the feature, to avoid
confusing the user unnecessarily.

Reported by Galy Lee in <200705310914.l4V9E6JA094603@wwwmaster.postgresql.org>;
per subsequent discussion.
2007-06-08 21:09:49 +00:00
Tom Lane 4213e5f0db Add note that LIMIT without ORDER BY can produce outright nondeterministic
results.  Necessary due to introduction of syncscan patch.
2007-06-08 20:26:18 +00:00
Bruce Momjian a3e3389913 Done:
< * Allow sequential scans to take advantage of other concurrent
> * -Allow sequential scans to take advantage of other concurrent
<
<   One possible implementation is to start sequential scans from the lowest
<   numbered buffer in the shared cache, and when reaching the end wrap
<   around to the beginning, rather than always starting sequential scans
<   at the start of the table.
<
<   http://archives.postgresql.org/pgsql-patches/2006-12/msg00076.php
<   http://archives.postgresql.org/pgsql-hackers/2006-12/msg00408.php
<   http://archives.postgresql.org/pgsql-hackers/2006-12/msg00784.php
<   http://archives.postgresql.org/pgsql-hackers/2007-03/msg00415.php
<
2007-06-08 18:45:22 +00:00
Tom Lane 24ee8af573 Rework temp_tablespaces patch so that temp tablespaces are assigned separately
for each temp file, rather than once per sort or hashjoin; this allows
spreading the data of a large sort or join across multiple tablespaces.
(I remain dubious that this will make any difference in practice, but certain
people insisted.)  Arrange to cache the results of parsing the GUC variable
instead of recomputing from scratch on every demand, and push usage of the
cache down to the bottommost fd.c level.
2007-06-07 19:19:57 +00:00
Tom Lane 04d919a11a Fix array_dims() example to be consistent with the data previously shown.
Christian Rossow
2007-06-07 14:49:56 +00:00
Tom Lane 2d4db3675f Fix up text concatenation so that it accepts all the reasonable cases that
were accepted by prior Postgres releases.  This takes care of the loose end
left by the preceding patch to downgrade implicit casts-to-text.  To avoid
breaking desirable behavior for array concatenation, introduce a new
polymorphic pseudo-type "anynonarray" --- the added concatenation operators
are actually text || anynonarray and anynonarray || text.
2007-06-06 23:00:50 +00:00
Tom Lane 31edbadf4a Downgrade implicit casts to text to be assignment-only, except for the ones
from the other string-category types; this eliminates a lot of surprising
interpretations that the parser could formerly make when there was no directly
applicable operator.

Create a general mechanism that supports casts to and from the standard string
types (text,varchar,bpchar) for *every* datatype, by invoking the datatype's
I/O functions.  These new casts are assignment-only in the to-string direction,
explicit-only in the other, and therefore should create no surprising behavior.
Remove a bunch of thereby-obsoleted datatype-specific casting functions.

The "general mechanism" is a new expression node type CoerceViaIO that can
actually convert between *any* two datatypes if their external text
representations are compatible.  This is more general than needed for the
immediate feature, but might be useful in plpgsql or other places in future.

This commit does nothing about the issue that applying the concatenation
operator || to non-text types will now fail, often with strange error messages
due to misinterpreting the operator as array concatenation.  Since it often
(not always) worked before, we should either make it succeed or at least give
a more user-friendly error; but details are still under debate.

Peter Eisentraut and Tom Lane
2007-06-05 21:31:09 +00:00
Peter Eisentraut 9539e64bc0 Remove gratuitous response messages from utility programs.
(Possibly release notes material, lest users be confused.)

The --quiet option is now obsolete and without effect in createdb,
createuser, dropdb, dropuser; kept for compatibility but marked for
removal in 8.4.

Progress messages when acting on all databases now go to stdout instead
of stderr, since they are not in fact errors.

Ordered options in reindexdb reference page alphabetically, like in
other programs' pages.
2007-06-04 10:02:40 +00:00
Bruce Momjian 55477d742e Remove description for:
o -Add a GUC variable to control the tablespace for temporary objects
          and sort files
<
< 	  It could start with a random tablespace from a supplied list and
< 	  cycle through the list.
<
2007-06-03 18:49:28 +00:00
Tom Lane acfce502ba Create a GUC parameter temp_tablespaces that allows selection of the
tablespace(s) in which to store temp tables and temporary files.  This is a
list to allow spreading the load across multiple tablespaces (a random list
element is chosen each time a temp object is to be created).  Temp files are
not stored in per-database pgsql_tmp/ directories anymore, but per-tablespace
directories.

Jaime Casanova and Albert Cervera, with review by Bernd Helmle and Tom Lane.
2007-06-03 17:08:34 +00:00
Bruce Momjian 4e023373d0 Re-add TODO and clarify it is for the kernel cache:
< * Allow free-behind capability for large sequential scans, perhaps using
<   posix_fadvise()
> * Allow free-behind capability for large sequential scans to avoid
>   kernel cache spoiling
2007-06-02 11:28:01 +00:00
Bruce Momjian ededa6dfc8 TODO item not needed anymore now that the buffer cache is
scan-resistant:

<
< * Allow free-behind capability for large sequential scans, perhaps using
<   posix_fadvise()
<
<   Posix_fadvise() can control both sequential/random file caching and
<   free-behind behavior, but it is unclear how the setting affects other
<   backends that also have the file open, and the feature is not supported
<   on all operating systems.
2007-06-02 02:46:38 +00:00
Neil Conway f086be3d39 Allow leading and trailing whitespace in the input to the boolean
type. Also, add explicit casts between boolean and text/varchar. Both
of these changes are for conformance with SQL:2003.

Update the regression tests, bump the catversion.
2007-06-01 23:40:19 +00:00
Bruce Momjian 41ef1c0f32 Add URL for:
o Research self-referential UPDATEs that see inconsistent row versions
          in read-committed mode
<
> 	  http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php
2007-06-01 18:41:55 +00:00
Bruce Momjian 4fbdcc174e Update wording:
o Research self-referential UPDATEs that see inconsistent row versions
          in read-committed mode


http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php
2007-06-01 18:40:42 +00:00
Bruce Momjian 397d00af8f Wording improvement. 2007-06-01 04:11:43 +00:00
Bruce Momjian 4dc6319331 Update FAQ_DEV URL to output for text format. 2007-06-01 04:05:36 +00:00
Bruce Momjian 95e9f4ede3 Add URL for code comments to developer's FAQ:
http://www.ibm.com/developerworks/linux/library/l-clear-code/?ca=dgr-FClnxw01linuxcodetips
2007-06-01 00:28:35 +00:00
Bruce Momjian 9b89c13ab5 Update:
< * Consider allowing 64-bit integers to be passed by value on 64-bit
<   platforms
> * Consider allowing 64-bit integers and floats to be passed by value on
>   64-bit platforms
>
>   Also change 32-bit floats (float4) to be passed by value at the same
>   time.
>
2007-05-30 20:26:06 +00:00
Bruce Momjian 0a6f2ee84d Fix wording:
< * Consider allowing 64-bit integers to be passed by reference on 64-bit
> * Consider allowing 64-bit integers to be passed by value on 64-bit
2007-05-30 20:02:41 +00:00
Bruce Momjian 8a73ec138e Add:
>
> * Consider allowing 64-bit integers to be passed by reference on 64-bit
>   platforms
2007-05-30 20:00:35 +00:00
Bruce Momjian 9e38d2a4a8 Update documentation mention of VACUUM FULL and CLUSTER where
appropriate.

Guillaume Cottenceau
2007-05-30 19:45:01 +00:00
Bruce Momjian 85df43f341 Add URL for:
* Improve speed with indexes

  For large table adjustments during VACUUM FULL, it is faster to cluster
  or reindex rather than update the index.  Also, index updates can bloat
  the index.
2007-05-30 19:07:20 +00:00
Bruce Momjian 7d3b7011b0 Add documentation reference to statistical functions from func.sgml.
Jim Nasby
2007-05-30 18:13:29 +00:00
Bruce Momjian 44af16f6b7 Update cvsutils documentation description. 2007-05-30 18:00:08 +00:00
Bruce Momjian ea2ab0bd10 Update cvs instructions to suggest cvsutils.
David Fetter
2007-05-30 17:41:43 +00:00
Neil Conway 6af04882de Fix a bug in input processing for the "interval" type. Previously,
"microsecond" and "millisecond" units were not considered valid input
by themselves, which caused inputs like "1 millisecond" to be rejected
erroneously.

Update the docs, add regression tests, and backport to 8.2 and 8.1
2007-05-29 04:58:43 +00:00
Bruce Momjian e031844eac Update wording:
< * Fix self-referential UPDATEs seeing inconsistent row versions in
> * Fix self-referential UPDATEs that see inconsistent row versions in
2007-05-28 23:56:29 +00:00
Bruce Momjian 4c75abde53 Add:
>
> * Fix self-referential UPDATEs seeing inconsistent row versions in
>   read-committed mode
>
>   http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php
2007-05-28 23:56:00 +00:00
Peter Eisentraut 3963574d13 XPath fixes:
- Function renamed to "xpath".
 - Function is now strict, per discussion.
 - Return empty array in case when XPath expression detects nothing
   (previously, NULL was returned in such case), per discussion.
 - (bugfix) Work with fragments with prologue: select xpath('/a',
   '<?xml version="1.0"?><a /><b />'); // now XML datum is always wrapped
   with dummy <x>...</x>, XML prologue simply goes away (if any).
 - Some cleanup.

Nikolay Samokhvalov

Some code cleanup and documentation work by myself.
2007-05-21 17:10:29 +00:00
Peter Eisentraut 0c644d2c3d Fix spurious German index entry 2007-05-21 15:11:12 +00:00
Peter Eisentraut 2f1bf8248a Mark some intermediate targets as .PRECIOUS, to replace the recently removed
.SECONDARY target.  This makes experimentation with the PDF builds easier.
2007-05-18 15:55:03 +00:00
Bruce Momjian f22967ee38 Done:
< * Fix problem with excessive logging during SSL disconnection
> * -Fix problem with excessive logging during SSL disconnection
2007-05-18 01:22:09 +00:00
Bruce Momjian 16b5254318 dded to TODO:
>
> * Support scoped IPv6 addresses
>
>   http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php
2007-05-17 23:42:33 +00:00
Neil Conway db5ff64df1 Tweaks for SGML markup. 2007-05-17 23:36:04 +00:00
Bruce Momjian 3f186a2034 Add URL for:
* Implement the SQL standard mechanism whereby REVOKE ROLE revokes only
  the privilege granted by the invoking role, and not those granted
  by other roles
>
>   http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php
2007-05-17 22:53:23 +00:00
Bruce Momjian 347534e85a Add, per Alvaro:
>
> * Implement the SQL standard mechanism whereby REVOKE ROLE revokes only
>   the privilege granted by the invoking role, and not those granted
>   by other roles
2007-05-17 22:44:11 +00:00
Bruce Momjian a11d4b8bea Add:
>
> * Fix problem with excessive logging during SSL disconnection
>
>   http://archives.postgresql.org/pgsql-bugs/2006-12/msg00122.php
>   http://archives.postgresql.org/pgsql-bugs/2007-05/msg00065.php
2007-05-17 22:42:54 +00:00
Neil Conway dfcf99bf93 Fix a bunch of bad grammar in the docs: "<link>, which see for more
information" is un-good English.
2007-05-15 19:43:51 +00:00
Neil Conway 79ba540b78 Various fixes for the SGML docs. Consistently use spaces before/after
parentheses in syntax descriptions. Consistently use the present tense
when describing the basic purpose of each "DROP" command. Add a few
more hyperlinks.
2007-05-15 19:13:55 +00:00
Bruce Momjian 178214d2ae Update comments for PG_DETOAST_PACKED and VARDATA_ANY on a structures
that require alignment.

Add a paragraph to the "User-Defined Types" chapter on using these
macros since it seems like they're a hit.

Gregory Stark
2007-05-15 17:39:54 +00:00
Neil Conway 39712d1184 Make a few marginal improvements to the documentation for the AV
launcher daemon.
2007-05-15 15:52:40 +00:00
Neil Conway 513836c7aa Add a note to the documentation to clarify that even when
"autovacuum = off", the system may still periodically start autovacuum
processes to prevent XID wraparound. Patch from David Fetter, with
editorializing.
2007-05-15 15:35:46 +00:00