Commit Graph

83 Commits

Author SHA1 Message Date
Bruce Momjian 01e0dae689 I've created a new section to func.sgml, "Binary String Functions and
Operators", plagiarized shamelessly from the "String Functions and
Operators" section. There were enough differences that it made sense (at
least to me) to give this its own section instead of cramming it in with
normal string functions. This way I could also make the examples
relevant, which is particularly important for bytea.

One thing I think worth mentioning: while documenting the trim()
function I realized that I never implemented the bytea equivalent of
rtrim and ltrim. Therefore, the 'leading' and 'trailing' forms of trim,
available with text, are not available with bytea (I'd be happy to
correct this, but since it would require an initdb, I guess not until
7.3) -- the submitted doc accurately reflects this.

I will look for other areas of the docs that need mention of bytea, but
any guidance would be much appreciated.

--

Here's a second bytea documentation patch. This one significantly
expands the "Binary Data" section added by Bruce recently.


Joe Conway
2001-11-20 15:42:44 +00:00
Tom Lane 5e86d226e4 Grammatical and spelling fixes. 2001-11-19 09:05:02 +00:00
Tom Lane 9b03776ff2 A bunch of small doco updates motivated by scanning the comments on
the interactive docs.
2001-11-19 03:58:25 +00:00
Tom Lane deab49566d Mention that LIKE ... ESCAPE '' is allowed to specify no
escape character.
2001-11-18 21:17:10 +00:00
Tom Lane 2043340b87 Expand documentation for sequence functions (nextval and friends).
Place it in the expected place in the User's Guide, rather than
hiding it in the command reference page for CREATE SEQUENCE.
2001-11-17 22:20:34 +00:00
Tatsuo Ishii f426465ba9 Add a new function "pg_client_encoding" which returns the current client
side encoding name. This is necessary for client API's such as JDBC
to perform correct encoding conversions. See my email "[HACKERS]
pg_client_encoding" 10 Sep 2001.
2001-10-12 02:08:34 +00:00
Peter Eisentraut 371f49bf9f Remove gratuitous discrepancy between extract() and date_part(),
regarding timezone_hour, timezone_minute vs. tz_hour, tz_minute.
Document the former.
2001-10-10 00:02:42 +00:00
Peter Eisentraut ffb8f73890 Bunch of copy fitting and style sheet tweakage to get decent looking print
output (from pdfjadetex).  Also updated instructions to install documentation
processing toolchain.
2001-10-09 18:46:00 +00:00
Thomas G. Lockhart 0b268e5d88 Fix markup to allow compilation. The chapters on failure and recovery
need more work, but at least they have something now.
2001-09-28 20:48:17 +00:00
Thomas G. Lockhart f9681968e0 Add information on new timestamp and timestamptz data types.
Start chapter on recovery techniques. Still needs work for release.
2001-09-28 08:15:35 +00:00
Peter Eisentraut 14ac04710a Document the sign() function. 2001-09-20 16:41:26 +00:00
Peter Eisentraut a1ee06625c Provide tunable knob for x = NULL -> x IS NULL transformation, default to off. 2001-09-20 14:20:28 +00:00
Tatsuo Ishii aa398e5034 Add missing ';' 2001-09-10 02:46:18 +00:00
Peter Eisentraut 84956e71a3 Markup additions and spell check. (covers User's Guide) 2001-09-09 17:21:59 +00:00
Bruce Momjian 2a34134b6c - new to_char(interval, text)
- new millisecond (ms) and microsecond (us) support
 - more robus parsing from string - used is separator checking for
   non-exact formats like to_date('2001-9-1', 'YYYY-MM-DD')
 - SGML docs are included

Karel Zak
2001-09-06 03:22:42 +00:00
Tatsuo Ishii 5608f13028 The actual execution results are different from examples. 2001-08-31 07:45:09 +00:00
Tatsuo Ishii a32624b45c Actual results are different from examples 2001-08-31 07:30:05 +00:00
Tatsuo Ishii 397f65d102 Add convert. 2001-08-15 07:10:12 +00:00
Tom Lane 5f7c2bdb53 sum() on int2 and int4 columns now uses an int8, not numeric, accumulator
for speed reasons; its result type also changes to int8.  avg() on these
datatypes now accumulates the running sum in int8 for speed; but we still
deliver the final result as numeric, so that fractional accuracy is
preserved.

count() now counts and returns in int8, not int4.  I am a little nervous
about this possibly breaking users' code, but there didn't seem to be
a strong sentiment for avoiding the problem.  If we get complaints during
beta, we can change count back to int4 and add a "count8" aggregate.
For that matter, users can do it for themselves with a simple CREATE
AGGREGATE command; the int4inc function is still present, so no C hacking
is needed.

Also added max() and min() aggregates for OID that do proper unsigned
comparison, instead of piggybacking on int4 aggregates.

initdb forced.
2001-08-14 22:21:59 +00:00
Bruce Momjian 7771436e18 > > Put encode() into base system. Used part of Alex' patch
> > for docs, hope he does not mind ;)

Marko Kreen
2001-07-11 22:14:03 +00:00
Bruce Momjian 86bc2d91c3 Correct substring() example, found by Thomas T. Thai. 2001-07-03 02:42:18 +00:00
Tom Lane 116d2bba7e Add IS UNKNOWN, IS NOT UNKNOWN boolean tests, fix the existing boolean
tests to return the correct results per SQL9x when given NULL inputs.
Reimplement these tests as well as IS [NOT] NULL to have their own
expression node types, instead of depending on special functions.
From Joe Conway, with a little help from Tom Lane.
2001-06-19 22:39:12 +00:00
Tom Lane 2adf1ce63c Oops, forgot to commit doco updates for has_table_privilege. 2001-06-15 21:03:07 +00:00
Bruce Momjian d7763c1f9c Docs for:
> >> inet(text), cidr(text): convert a text value into inet/cidr
> >> set_masklen(inet): set masklen on the inet value

Alex Pilosov
2001-06-13 22:51:02 +00:00
Peter Eisentraut 444c5bf1b2 SQL function bit_length 2001-05-24 09:29:29 +00:00
Peter Eisentraut 01839df6dd Add index. Only some parts of the manual set have index entries so far... 2001-05-12 22:51:36 +00:00
Thomas G. Lockhart e6767a3205 Final markup for 7.1 hardcopy release. Mostly typo and table-fitting
adjustments. Note that many tables are being abused with *really* long
 description columns. Should probably shrink those columns to be more
 concise, and move some of the info to follow-on reference notes.
2001-04-20 15:52:33 +00:00
Tom Lane 39ceedf5e0 The regexp pattern characters ^ and $ should be explained as matching
at the beginning and end of the input string, not the beginning and end
of "a line", since Postgres does not allow them to match at newline
characters in the data.
2001-03-25 18:14:31 +00:00
Tom Lane d584bf4867 Improve description of to_char templates. 2001-03-15 01:07:51 +00:00
Tom Lane e14a9deb93 Document timeofday(), mention start-of-transaction vs. current-time
semantics, a few other small improvements.
2001-02-21 23:15:24 +00:00
Tom Lane fa0cd643d2 AND/OR truth table needs another row IMHO. 2001-02-19 00:01:18 +00:00
Peter Eisentraut 48d03278a2 Enhance documentation of date/time functions. Add extract, current_date,
current_time, current_timestamp.  Add more examples.  Remove age(), because
it doesn't work like it is documented, and no one could explain it to me.
2001-02-18 17:17:17 +00:00
Bruce Momjian 8824741f99 User Manual
Chapter 4
   String Operators
    Table 4.7: Other String Functions
      strpos is missing the result in the result column, it should be 2
      Also to_ascii might need a result but maybe not.

Appendix A
In the Time Zone Table
 Greenwich is spelled Greenwish

David Aldrich
2001-02-12 14:21:27 +00:00
Peter Eisentraut 192ce19d36 Document BETWEEN. 2001-02-05 19:21:45 +00:00
Peter Eisentraut 4f34f55d3d Description of table expressions, including join syntax, from Robert B.
Easter <reaster@comptechnews.com>, heavily massaged by me.  Also cleaned up
value expressions a bit.
2001-01-21 22:02:01 +00:00
Peter Eisentraut 74bbe8097d Replace some oldish, non-SQL'ish elements with more standard forms. (cast
syntax, type names, function names, etc.)
2001-01-20 20:59:29 +00:00
Peter Eisentraut 526427f6d3 Add information about bit types. Adjust some other things to promote
SQL type names over internal type names.
2001-01-13 18:34:51 +00:00
Tom Lane 61784c54b5 Change default output formatting for CIDR to be unabbreviated, per
recommendation from Paul Vixie.  Add a new abbrev() function to produce
abbreviated format as text.  No forced initdb, but new function is not
available unless you do an initdb or add the pg_proc row manually.
2000-12-22 18:00:24 +00:00
Peter Eisentraut f9698a938f Correct results of usage examples. 2000-12-19 17:35:46 +00:00
Tom Lane 7b9fe96812 Update type-coercion discussions to reflect current reality. 2000-12-17 05:55:26 +00:00
Tom Lane 6a0f486a25 A little wordsmithing in the pattern-matching section. 2000-12-16 19:33:23 +00:00
Tom Lane d316f22267 Add note that COALESCE and NULLIF are shorthand forms of CASE. 2000-12-16 18:33:13 +00:00
Peter Eisentraut c3641483c3 Merge functions and operators chapters. Lots of updates. 2000-12-14 22:30:56 +00:00
Tom Lane 796754778d Correct obsolete entry for strpos(). 2000-11-30 23:02:04 +00:00
Peter Eisentraut f4710020d6 Repair markup 2000-11-25 13:20:05 +00:00
Bruce Momjian 3f1998727d here is a patch for formatting.c (to_char/timestampt()), for 7.1
it fixing Y,YY,YYY,YYYY conversion, the docs and regress tests update
 are included too.

  During the patch testing I found small bug in miscadmin.h in
convertstr() declaration. Here it's fixed too.

 Thanks

        Karel
2000-11-25 05:00:33 +00:00
Tom Lane a210023008 Adjust INET/CIDR display conventions and reimplement some INET/CIDR
functions, per recent discussions on pghackers.  For now, I have called
the verbose-display formatting function text(), but will reconsider if
enough people object.
initdb forced.
2000-11-10 20:13:27 +00:00
Peter Eisentraut baa3a09b5f Convert macaddr documentation to DocBook, update outdated information. 2000-10-04 15:47:45 +00:00
Peter Eisentraut 72ad5fe15c Add `id' attributes to all `chapter' and `sect1' tags, to generate useful
names for the HTML files (e.g., not x4856.htm).
2000-09-29 20:21:34 +00:00
Bruce Momjian ebdfac3bb1 the patch include:
- rename ichar() to chr() (discussed with Tom)

        - add docs for oracle compatible routines:

                btrim()
                ascii()
                chr()
                repeat()

        - fix bug with timezone in to_char()

        - all to_char() variants return NULL instead textin("")
          if it's needful.

 The contrib/odbc is without changes and contains same routines as main
tree ... because I not sure how plans are Thomas with this :-)

                                        Karel
---------------------------------------------------------------------------

This effectively one line patch should fix the fact that
foreign key definitions in create table were erroring if
a primary key was defined.  I was using the columns
list to get the columns of the table for comparison, but
it got reused as a temporary list inside the primary key
stuff.

Stephan Szabo
2000-09-25 12:58:47 +00:00