Commit Graph

75 Commits

Author SHA1 Message Date
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
Peter Eisentraut 457ac0331c Implement differentiation between CURRENT_USER and SESSION_USER as per SQL.
There is still no effective difference but it will kick in once setuid
functions exist (not included here).  Make old getpgusername() alias for
current_user.
2000-09-19 18:18:04 +00:00
Bruce Momjian dffd8cac3d * to_char:
- full support for IW (ISO week) and vice versa conversion for IW too
    (the to_char 'week' support is now complete and I hope correct).

  Thomas, I use for IW code from timestamp.c, for this I create separate
  function date2isoweek() from original 'case DTK_WEEK:' code in the
  timestamp_part(). I mean will better use one code for same feature in
  date_part() and in to_char(). The isoweek2date() is added to timestamp.c
  too. Right?

  IMHO in 7.1 will all to_char's features complete. It is cca 41 templates
  for date/time and cca 21 for numbers.

 * to_ascii:

   - gcc, is it correct now? :-)


  In the patch is documentation for to_char's IW and for to_ascii().

                                                        Karel
2000-08-29 04:41:48 +00:00
Tom Lane 9426047021 Clean up bogosities in use of random(3) and srandom(3) --- do not assume
that RAND_MAX applies to them, since it doesn't.  Instead add a
config.h parameter MAX_RANDOM_VALUE.  This is currently set at 2^31-1
but could be auto-configured if that ever proves necessary.  Also fix
some outright bugs like calling srand() where srandom() is appropriate.
2000-08-07 00:51:42 +00:00
Tom Lane d70d46fd60 PATH and POLYGON datatypes are now TOASTable. Associated functions
updated to new fmgr style.  Deleted hoary old functions for compatibility
with pre-6.1 representations of these datatypes.
2000-07-29 18:46:12 +00:00
Tom Lane d06ebdb8d3 Update aggregate-function docs for STDDEV, VARIANCE. 2000-07-17 03:52:28 +00:00
Thomas G. Lockhart 4835f6a8bc Update docs for TIME WITHOUT TIME ZONE.
Add information on SET SESSION CHARACTERISTICS.
Fix references to pg_hba.conf(5) since that is no longer a man page.
2000-07-14 15:26:21 +00:00
Thomas G. Lockhart bebd62c19f Remove reference to tag which is not available to the User's Guide
when built on its own. UG now builds cleanly.
2000-07-08 16:00:15 +00:00
Bruce Momjian efcff3da16 In the attache is new (correct) version. I add TZ (timezone) support
for
to_char() too.

Karel
2000-07-03 16:01:33 +00:00