Commit Graph

265 Commits

Author SHA1 Message Date
Neil Conway c3f1b0f4dd This doc patch replaces all inappropriate references to SQL:1999 when it
is used as if it were the latest (and/or still valid) SQL standard.
SQL:2003 is used in its place. Patch from Simon Riggs.
2005-07-14 06:17:36 +00:00
Bruce Momjian 75a64eeb4b I made the patch that implements regexp_replace again.
The specification of this function is as follows.

regexp_replace(source text, pattern text, replacement text, [flags
text])
returns text

Replace string that matches to regular expression in source text to
replacement text.

 - pattern is regular expression pattern.
 - replacement is replace string that can use '\1'-'\9', and '\&'.
    '\1'-'\9': back reference to the n'th subexpression.
    '\&'     : entire matched string.
 - flags can use the following values:
    g: global (replace all)
    i: ignore case
    When the flags is not specified, case sensitive, replace the first
    instance only.

Atsushi Ogawa
2005-07-10 04:54:33 +00:00
Bruce Momjian a923602855 Add pg_column_size() to return storage size of a column, including
possible compression.

Mark Kirkwood
2005-07-06 19:02:54 +00:00
Bruce Momjian a29d815a7a Improve gettimeofday() documentation.
Karl O. Pinc
2005-06-29 01:52:56 +00:00
Tom Lane 7762619e95 Replace pg_shadow and pg_group by new role-capable catalogs pg_authid
and pg_auth_members.  There are still many loose ends to finish in this
patch (no documentation, no regression tests, no pg_dump support for
instance).  But I'm going to commit it now anyway so that Alvaro can
make some progress on shared dependencies.  The catalog changes should
be pretty much done.
2005-06-28 05:09:14 +00:00
Tom Lane 943b396245 Add Oracle-compatible GREATEST and LEAST functions. Pavel Stehule 2005-06-26 22:05:42 +00:00
Tom Lane b90f8f20f0 Extend r-tree operator classes to handle Y-direction tests equivalent
to the existing X-direction tests.  An rtree class now includes 4 actual
2-D tests, 4 1-D X-direction tests, and 4 1-D Y-direction tests.
This involved adding four new Y-direction test operators for each of
box and polygon; I followed the PostGIS project's lead as to the names
of these operators.
NON BACKWARDS COMPATIBLE CHANGE: the poly_overleft (&<) and poly_overright
(&>) operators now have semantics comparable to box_overleft and box_overright.
This is necessary to make r-tree indexes work correctly on polygons.
Also, I changed circle_left and circle_right to agree with box_left and
box_right --- formerly they allowed the boundaries to touch.  This isn't
actually essential given the lack of any r-tree opclass for circles, but
it seems best to sync all the definitions while we are at it.
2005-06-24 20:53:34 +00:00
Neil Conway 4aaff55359 Minor SGML markup cleanup. 2005-06-15 06:29:25 +00:00
Bruce Momjian 0851a6fbc7 This patch makes it possible to use the full set of timezones when doing
"AT TIME ZONE", and not just the shorlist previously available. For
example:

SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';

works fine now. It will also obey whatever DST rules were in effect at
just that date, which the previous implementation did not.

It also supports the AT TIME ZONE on the timetz datatype. The whole
handling of DST is a bit bogus there, so I chose to make it use whatever
DST rules are in effect at the time of executig the query. not sure if
anybody is actuallyi *using* timetz though, it seems pretty
unpredictable just because of this...

Magnus Hagander
2005-06-15 00:34:11 +00:00
Bruce Momjian 8b84aebddf Add BETWEEN SYMMETRIC.
Pavel Stehule
2005-06-14 23:47:39 +00:00
Bruce Momjian f5835b4b8d Add pg_postmaster_start_time() function.
Euler Taveira de Oliveira
Matthias Schmidt
2005-06-14 21:04:42 +00:00
Neil Conway 8c05ca7754 SGML cleanup: consistently use "endterm" in <xref>s that link to the
reference page for SQL commands, so that the link text is italicized.
2005-06-13 02:40:08 +00:00
Bruce Momjian 4d0e7b4aac Please find attached a patch (diff -c against cvs HEAD) to add a
function that accepts a double precision argument assumed to be a Unix
epoch timestamp and returns timestamp with time zone, and accompanying
documentation.

Usage:

test=# select to_timestamp(200120400);
       to_timestamp
------------------------
  1976-05-05 14:00:00+09
(1 row)

Michael Glaesemann
2005-06-09 16:35:09 +00:00
Neil Conway 657c098e41 Add a function lastval(), which returns the value returned by the
last nextval() or setval() performed by the current session. Update the
docs, add regression tests, and bump the catalog version. Patch from
Dennis Björklund, various improvements by Neil Conway.
2005-06-07 07:08:35 +00:00
Tom Lane 128c25b52f Trivial markup improvement. 2005-06-06 16:29:01 +00:00
Neil Conway 1b41965d5d Remove some verbiage describing how min() and max() are slow when applied
to the entire table: as of current sources, they are no longer slow
provided there is an index on the column.
2005-05-23 01:50:01 +00:00
Neil Conway dd2894dfd6 Consistently do not include a terminating period in single-sentence
function descriptions in func.sgml; other minor SGML tweaks.
2005-05-23 01:29:54 +00:00
Neil Conway f3567eeaf2 Implement md5(bytea), update regression tests and documentation. Patch
from Abhijit Menon-Sen, minor editorialization from Neil Conway. Also,
improve md5(text) to allocate a constant-sized buffer on the stack
rather than via palloc.

Catalog version bumped.
2005-05-20 01:29:56 +00:00
Neil Conway a535a1522f Fix newly introduced spelling error. 2005-05-11 13:58:50 +00:00
Bruce Momjian 147144c6ca Add mention that not all functions are listed.
Update Chinese FAQ for HTML.
2005-05-11 13:36:14 +00:00
Neil Conway 6853a37a83 Minor consistency improvement to the documentation on array functions. 2005-04-13 00:20:10 +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
Neil Conway d4beb2636c Minor tweak to documentation. 2005-03-30 04:52:49 +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 e7fb9f18bf Add support for Win1252 encoding.
Roland Volkmann
2005-03-14 18:31:25 +00:00
Bruce Momjian e3d7de6b99 Rename canonical encodings, per Peter:
UNICODE => UTF8
	ALT => WIN866
	WIN => WIN1251
	TCVN => WIN1258

The old codes continue to work.
2005-03-07 04:30:55 +00:00
Neil Conway 484f0464ff Implement max() and min() aggregates for array types. Patch from Koju
Iijima, reviewed by Neil Conway. Catalog version number bumped,
regression tests updated.
2005-02-28 03:45:24 +00:00
Bruce Momjian 341251f202 Make clearer warning about using 'now' with DEFAULT:
SELECT CURRENT_TIMESTAMP;
	SELECT now();
	SELECT TIMESTAMP 'now';  -- incorrect for use with DEFAULT
2005-02-11 04:31:54 +00:00
Tom Lane 750d9171f6 Add documentation for format_type(), which somehow escaped it before. 2005-01-28 23:12:59 +00:00
Tom Lane 4de12d4470 Add docs for a couple of formerly-undocumented geometric conversion functions. 2005-01-26 20:42:19 +00:00
Bruce Momjian 1ced129aa3 More < and > cleanups converted to ampersands. 2005-01-22 22:56:36 +00:00
Tom Lane 0471cd5f62 Clarify description of greedy and non-greedy POSIX regular expressions,
per discussion in Nov 2004 with Ken Tanzer.
2005-01-09 20:08:50 +00:00
Tom Lane 6889537c48 Some small docs improvements motivated by reading the comments for the 7.4
7.4 interactive docs.
2005-01-08 05:19:18 +00:00
Tom Lane 0add759825 More minor updates and copy-editing. 2004-12-23 23:07:38 +00:00
Bruce Momjian bbb2e21e14 I was recently surprised to find that EXTRACT's day of the week
numbering is different than TO_CHAR's ditto. EXTRACT starts at 0==Sunday
while TO_CHAR starts at 1==Sunday.

A suggestion for two documentation notes is attached as a patch to
current CVS HEAD.

Troels Arvin
2004-12-21 01:02:28 +00:00
Peter Eisentraut 5ec30faee6 Spell checker run 2004-12-13 18:05:10 +00:00
Bruce Momjian 2254d4ef1b Back out ARRAY() patch. 2004-12-03 18:34:31 +00:00
Bruce Momjian 4af2ea329b Add documention on ARRAY() function.
David Fetter
2004-12-02 21:04:47 +00:00
Bruce Momjian 22c21bab92 Wording improvement. 2004-12-02 17:39:54 +00:00
Bruce Momjian 91cf5ef550 Document that btrim()'s second parameter is optional, and defaults to spaces. 2004-12-02 17:14:54 +00:00
Tom Lane 4828445d3c Clarify documentation of age() functions. 2004-12-01 19:32:12 +00:00
Peter Eisentraut 49cbef7947 Update of conformance information to SQL:2003
by Troels Arvin, Simon Riggs, Elein Mustain

Make spelling of SQL standard names uniform.
2004-11-27 21:27:08 +00:00
Neil Conway ec7a6bd9a2 Replace "--" and "---" with "&mdash;" as appropriate, for better-looking
output.
2004-11-15 06:32:15 +00:00
Peter Eisentraut 4b3a2d854c Use correct function name in example 2004-11-08 15:57:05 +00:00
Tom Lane 3d2849820b Document IS DISTINCT FROM in a more obvious place, and add some more
index entries for IS-foo constructs.
2004-10-26 22:16:12 +00:00
Neil Conway 3da69bd18c Fix error in setseed() docs: "int32" is not a (SQL) type, but "integer" is. 2004-10-04 08:15:41 +00:00
Neil Conway bb467563ec Fix typo in docs. 2004-09-28 10:18:22 +00:00
Bruce Momjian af032f15da Replace incorrect example for quote_ident
Greg Sabino Mullan
2004-08-18 03:06:56 +00:00
Tom Lane 97b1ac1aef Update documentation to reflect the fact that we now know exactly what
time zone names we support.
2004-08-10 00:55:08 +00:00
Tom Lane fcbc438727 Label CVS tip as 8.0devel instead of 7.5devel. Adjust various comments
and documentation to reference 8.0 instead of 7.5.
2004-08-04 21:34:35 +00:00