Commit Graph

377 Commits

Author SHA1 Message Date
Neil Conway 64ee1a8a55 Fix a few typos in the docs. 2007-04-07 03:58:08 +00:00
Bruce Momjian 5f3fbe14f3 In docs, Symetric -> Symmetric.
Michael Fuhr
2007-04-07 03:34:36 +00:00
Bruce Momjian 43666e8216 Improve documentation/warning when --with-libxml is not used in the
installation.
2007-04-05 01:46:27 +00:00
Peter Eisentraut 626b4416b9 Put documentation on XML data type and functions in better positions. Add
some index terms.
2007-04-02 15:27:02 +00:00
Tom Lane 57690c6803 Support enum data types. Along the way, use macros for the values of
pg_type.typtype whereever practical.  Tom Dunstan, with some kibitzing
from Tom Lane.
2007-04-02 03:49:42 +00:00
Peter Eisentraut 0b75afda92 Mapping schemas and databases to XML and XML Schema.
Refactor and document the remaining mapping code.
2007-04-01 09:00:26 +00:00
Tatsuo Ishii 75c6519ff6 Add new encoding EUC_JIS_2004 and SHIFT_JIS_2004,
along with new conversions among EUC_JIS_2004, SHIFT_JIS_2004 and UTF-8.
catalog version has been bump up.
2007-03-25 11:56:04 +00:00
Neil Conway 9eb78beeae Add three new regexp functions: regexp_matches, regexp_split_to_array,
and regexp_split_to_table. These functions provide access to the
capture groups resulting from a POSIX regular expression match,
and provide the ability to split a string on a POSIX regular
expression, respectively. Patch from Jeremy Drake; code review by
Neil Conway, additional comments and suggestions from Tom and
Peter E.

This patch bumps the catversion, adds some regression tests,
and updates the docs.
2007-03-20 05:45:00 +00:00
Bruce Momjian b92767d525 Update "encode" documentation to mention that 'escape' only changes null
bytes and backslashes, remove "ASCII" mention.  Backpatch to 8.2.X.
2007-02-20 19:59:04 +00:00
Bruce Momjian ddd8817f45 Wording improvement. 2007-02-20 18:18:05 +00:00
Bruce Momjian 8272fc3f7b Comment-out documentation for IS OF because it doesn't conform to the
ISO SQL behavior. Backpatch removal to 8.2.X.
2007-02-20 14:04:50 +00:00
Bruce Momjian 6126d3e70b Document IS [NOT] OF, which was added in 7.3. 2007-02-20 00:25:05 +00:00
Bruce Momjian c62de15bec Document that to_char('J'/Julian) is midnight-based, per report that
Julian technically is noon to noon.
2007-02-19 22:51:44 +00:00
Bruce Momjian 9772e0007c Wording improvement. 2007-02-19 22:10:52 +00:00
Bruce Momjian 70007b4dd5 Clarify documentation for "day of the week" handling for to_char() and
EXTRACT().
2007-02-19 18:20:06 +00:00
Bruce Momjian 3e803f7273 Add "isodow" option to EXTRACT() and date_part() where Sunday = 7. 2007-02-19 17:41:39 +00:00
Peter Eisentraut 355e05ab41 Functions for mapping table data and table schemas to XML (a.k.a. XML export) 2007-02-16 07:46:55 +00:00
Bruce Momjian 4ab7ea5ace Remove tabs from SGML files to help tag alingment and improve
detection of tabs are added in the future.
2007-02-16 03:50:29 +00:00
Bruce Momjian 4ebb0cf9c3 Add two new format fields for use with to_char(), to_date() and
to_timestamp():
    - ID for day-of-week
    - IDDD for day-of-year

This makes it possible to convert ISO week dates to and from text
fully represented in either week ('IYYY-IW-ID') or day-of-year
('IYYY-IDDD') format.

I have also added an 'isoyear' field for use with extract / date_part.

Brendan Jurd
2007-02-16 03:39:46 +00:00
Peter Eisentraut 2f8ee82964 Fix typo 2007-02-14 18:46:08 +00:00
Bruce Momjian 09a9f10e7f Consistenly use colons before '<programlisting>' blocks, where
appropriate.
2007-02-01 00:28:19 +00:00
Bruce Momjian a134ee3379 Update documentation on may/can/might:
Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".

Also update two error messages mentioned in the documenation to match.
2007-01-31 20:56:20 +00:00
Bruce Momjian 4ed9f1d9b7 Update documentation for backslashes to mention escape string syntax
more, and standard_conforming_strings less, because in the future non-E
strings will not treat backslashes specially.

Also use E'' strings where backslashes are used in examples. (The
existing examples would have drawn warnings.)

Backpatch to 8.2.X.
2007-01-30 22:29:23 +00:00
Bruce Momjian ae875d318e Update documentation for pg_get_serial_sequence() function. 2007-01-30 02:39:27 +00:00
Peter Eisentraut 48ba3f5711 Update documentation on XML functions 2007-01-29 13:24:30 +00:00
Neil Conway 726f0807ad Update docs for recent change to setseed() return value. 2007-01-20 21:59:34 +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
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
Bruce Momjian 92dffbd029 Update to_char("CC") description. 2007-01-12 20:06:10 +00:00
Peter Eisentraut 8c1de5fb00 Initial SQL/XML support: xml data type and initial set of functions. 2006-12-21 16:05:16 +00:00
Bruce Momjian f14d43d2d3 Document that to_char() "TM" is controlled by lc_messages. 2006-11-25 00:38:53 +00:00
Bruce Momjian 016e0b4177 For to_char() day/month abbrevitions, mention "3 chars in English,
localized lengths vary".
2006-11-20 20:20:18 +00:00
Peter Eisentraut 0ff4352d7a Add some real descriptions to the multiargument aggregate functions rather
than just showing the incomprehensible formulas.
2006-10-23 19:57:37 +00:00
Peter Eisentraut 0f763503ff Spellchecking and such 2006-10-23 18:10:32 +00:00
Tom Lane e69c09c1e9 date_trunc also accepts 'quarter'. Noted by Yoshihisa Nakano. 2006-10-01 18:54:31 +00:00
Tom Lane 673a573dcc Remove duplicate (and now incorrect) documentation for row-wise IS [NOT]
NULL.  Noted by Teodor.
2006-09-29 18:36:45 +00:00
Tom Lane f213131f20 Fix IS NULL and IS NOT NULL tests on row-valued expressions to conform to
the SQL spec, viz IS NULL is true if all the row's fields are null, IS NOT
NULL is true if all the row's fields are not null.  The former coding got
this right for a limited number of cases with IS NULL (ie, those where it
could disassemble a ROW constructor at parse time), but was entirely wrong
for IS NOT NULL.  Per report from Teodor.

I desisted from changing the behavior for arrays, since on closer inspection
it's not clear that there's any support for that in the SQL spec.  This
probably needs more consideration.
2006-09-28 20:51:43 +00:00
Tom Lane e893e87530 Update timezone documentation to reflect current reality: instead of
giving tables of known timezone names, refer the user to the system views.
Joachim Wieland
2006-09-22 16:20:00 +00:00
Tom Lane 0efa510bf7 Add documentation for new in-core advisory lock functions. Merlin Moncure 2006-09-20 23:43:22 +00:00
Bruce Momjian 32cebaecff Remove emacs info from footer of SGML files. 2006-09-16 00:30:20 +00:00
Tom Lane 65ab9f4f24 Add a couple of information functions to support direct checks on whether
a schema is our own temp schema or another backend's temp schema, and use
these in place of some former kluges in information_schema.  Per my
proposal of yesterday.
2006-09-14 22:05:06 +00:00
Tom Lane 69b7c99265 Add missing documentation for new anyarray-overlap operator. 2006-09-10 19:03:57 +00:00
Tom Lane ba920e1c91 Rename contains/contained-by operators to @> and <@, per discussion that
agreed these symbols are less easily confused.  I made new pg_operator
entries (with new OIDs) for the old names, so as to provide backward
compatibility while making it pretty easy to remove the old names in
some future release cycle.  This commit only touches the core datatypes,
contrib will be fixed separately.
2006-09-10 00:29:35 +00:00
Tom Lane 7bae5a289c Get rid of the separate RULE privilege for tables: now only a table's owner
can create or modify rules for the table.  Do setRuleCheckAsUser() while
loading rules into the relcache, rather than when defining a rule.  This
ensures that permission checks for tables referenced in a rule are done with
respect to the current owner of the rule's table, whereas formerly ALTER TABLE
OWNER would fail to update the permission checking for associated rules.
Removal of separate RULE privilege is needed to prevent various scenarios
in which a grantee of RULE privilege could effectively have any privilege
of the table owner.  For backwards compatibility, GRANT/REVOKE RULE is still
accepted, but it doesn't do anything.  Per discussion here:
http://archives.postgresql.org/pgsql-hackers/2006-04/msg01138.php
2006-09-05 21:08:36 +00:00
Bruce Momjian 7d03215f31 Update setseed() documentation. 2006-09-04 21:47:25 +00:00
Bruce Momjian 04b84f5a93 Generalize width_bucket() documentation because b1/b2 can be
interchanged.
2006-08-22 00:49:19 +00:00
Tom Lane 2b2a50722c Fix all known problems with pg_dump's handling of serial sequences
by abandoning the idea that it should say SERIAL in the dump.  Instead,
dump serial sequences and column defaults just like regular ones.
Add a new backend command ALTER SEQUENCE OWNED BY to let pg_dump recreate
the sequence-to-column dependency that was formerly created "behind the
scenes" by SERIAL.  This restores SERIAL to being truly "just a macro"
consisting of component operations that can be stated explicitly in SQL.
Furthermore, the new command allows sequence ownership to be reassigned,
so that old mistakes can be cleaned up.

Also, downgrade the OWNED-BY dependency from INTERNAL to AUTO, since there
is no longer any very compelling argument why the sequence couldn't be
dropped while keeping the column.  (This forces initdb, to be sure the
right kinds of dependencies are in there.)

Along the way, add checks to prevent ALTER OWNER or SET SCHEMA on an
owned sequence; you can now only do this indirectly by changing the
owning table's owner or schema.  This is an oversight in previous
releases, but probably not worth back-patching.
2006-08-21 00:57:26 +00:00
Tom Lane e8ea9e9587 Implement archive_timeout feature to force xlog file switches to occur no more
than N seconds apart.  This allows a simple, if not very high performance,
means of guaranteeing that a PITR archive is no more than N seconds behind
real time.  Also make pg_current_xlog_location return the WAL Write pointer,
add pg_current_xlog_insert_location to return the Insert pointer, and fix
pg_xlogfile_name_offset to return its results as a two-element record instead
of a smashed-together string, as per recent discussion.

Simon Riggs
2006-08-17 23:04:10 +00:00
Tom Lane 704ddaaa09 Add support for forcing a switch to a new xlog file; cause such a switch
to happen automatically during pg_stop_backup().  Add some functions for
interrogating the current xlog insertion point and for easily extracting
WAL filenames from the hex WAL locations displayed by pg_stop_backup
and friends.  Simon Riggs with some editorialization by Tom Lane.
2006-08-06 03:53:44 +00:00
Tom Lane 1249cf8f38 SQL2003-standard statistical aggregates, by Sergey Koposov. I've added only
the float8 versions of the aggregates, which is all that the standard requires.
Sergey's original patch also provided versions using numeric arithmetic,
but given the size and slowness of the code, I doubt we ought to include
those in core.
2006-07-28 18:33:04 +00:00