Commit Graph

400 Commits

Author SHA1 Message Date
Bruce Momjian 68b08b2512 Whitespace cleanup. 2007-10-11 02:43:55 +00:00
Alvaro Herrera a3ff937359 Change π to plain "pi" in index entry, to avoid double escaping issues. 2007-10-07 01:13:30 +00:00
Andrew Dunstan 02138357ff Remove "convert 'blah' using conversion_name" facility, because if it
produces text it is an encoding hole and if not it's incompatible
with the spec, whatever the spec means (which we're not sure about anyway).
2007-09-24 01:29:30 +00:00
Bruce Momjian 4893eadc3c Remove tabs from SGML file. 2007-09-19 03:13:57 +00:00
Andrew Dunstan 55613bf9cd Close previously open holes for invalidly encoded data to enter the
database via builtin functions, as recently discussed on -hackers.

chr() now returns a character in the database encoding. For UTF8 encoded databases
the argument is treated as a Unicode code point. For other multi-byte encodings
the argument must designate a strict ascii character, or an error is raised,
as is also the case if the argument is 0.

ascii() is adjusted so that it remains the inverse of chr().

The two argument form of convert() is gone, and the three argument form now
takes a bytea first argument and returns a bytea. To cover this loss three new
functions are introduced:
. convert_from(bytea, name) returns text - converts the first argument from the
  named encoding to the database encoding
. convert_to(text, name) returns bytea - converts the first argument from the
  database encoding to the named encoding
. length(bytea, name) returns int - gives the length of the first argument in
  characters in the named encoding
2007-09-18 17:41:17 +00:00
Bruce Momjian 12afe7bc76 Document atan2() as y/x, rather than x/y, to conform to general usage.
Andrew Maclean
2007-09-14 15:53:48 +00:00
Bruce Momjian 4b836d8312 Add some links for escape strings.
Brendan Jurd

Fix markup in previous commit.
2007-09-14 14:54:25 +00:00
Bruce Momjian dfe2e3f7a5 Clarify age() 'months' calculation documentation. 2007-09-14 00:52:45 +00:00
Bruce Momjian a55eab8921 Only use SGML indexterm "zone" when we want to get the entire section.
Some alignment cleanups.
2007-08-31 21:33:48 +00:00
Bruce Momjian 99a01bfd1e In text search docs, properly use indexterm _zone_ only when we want an
entire section, per Peter.
2007-08-31 04:52:29 +00:00
Bruce Momjian 09c29cc57b Text search documentation word improvements; move configuration section
to be more logical.
2007-08-29 21:51:45 +00:00
Bruce Momjian bb8f629c7a Move full text search operators, functions, and data type sections into
the main documentation, out of its own text search chapter.
2007-08-29 20:37:14 +00:00
Tom Lane 140d4ebcb4 Tsearch2 functionality migrates to core. The bulk of this work is by
Oleg Bartunov and Teodor Sigaev, but I did a lot of editorializing,
so anything that's broken is probably my fault.

Documentation is nonexistent as yet, but let's land the patch so we can
get some portability testing done.
2007-08-21 01:11:32 +00:00
Andrew Dunstan e1a1da9f4b minor typo fixes in CSVlog docs, per Michael Glaesemann 2007-08-19 03:23:30 +00:00
Andrew Dunstan fd801f4faa Provide for logfiles in machine readable CSV format. In consequence, rename
redirect_stderr to logging_collector.
Original patch from Arul Shaji, subsequently modified by Greg Smith, and then
heavily modified by me.
2007-08-19 01:41:25 +00:00
Tom Lane a44af6df85 Document that the regexp split functions ignore zero-length matches in
certain corner cases.  Per discussion, the code does what we want, but
it really needs to be documented that these functions act differently
from regexp_matches.
2007-08-13 01:18:47 +00:00
Tom Lane 1b70619311 Code review for regexp_matches/regexp_split patch. Refactor to avoid assuming
that cached compiled patterns will still be there when the function is next
called.  Clean up looping logic, thereby fixing bug identified by Pavel
Stehule.  Share setup code between the two functions, add some comments, and
avoid risky mixing of int and size_t variables.  Clean up the documentation a
tad, and accept all the flag characters mentioned in table 9-19 rather than
just a subset.
2007-08-11 03:56:24 +00:00
Bruce Momjian df7128bd34 Document that age() adds days, then full months. 2007-07-18 03:12:42 +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
Bruce Momjian 7d3b7011b0 Add documentation reference to statistical functions from func.sgml.
Jim Nasby
2007-05-30 18:13:29 +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 e292090b59 Grammar correction 2007-05-07 07:53:26 +00:00
Neil Conway 3a96742ad2 Doc tweak: add an xref. 2007-05-07 02:03:58 +00:00
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