Commit Graph

53 Commits

Author SHA1 Message Date
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
Bruce Momjian e225260440 Back out Karels to_char changes. 2000-07-01 21:27:14 +00:00
Bruce Momjian 99212a4847 In the attache is new to_date()/to_timestamp() version.
Now the to_timestamp() support WW,W,J,SSSS,DDD conversion from strings and
the am/pm bug is fixed, the to_char() use week-of-year (WW) full compatible
with Oracle.

 This patch update relevant regress-tests and docs too.

                                        Karel
~
~
2000-07-01 14:10:32 +00:00
Bruce Momjian b997a4b91f > Great! Please cc: the docs or hackers mailing lists to make sure the
> patches are not lost...

Aggregate doc patches:

The patches are attached. Be great if you could check them over to make
sure all relevant content (and markup) is there...

Isaac Wilcox
2000-06-20 18:04:18 +00:00
Bruce Momjian 1bea3c3c46 Fix atan3-> atan2. 2000-05-15 01:41:18 +00:00
Thomas G. Lockhart 45f79cae14 Fixups in content and markup for 7.0 release. 2000-05-02 20:02:03 +00:00
Thomas G. Lockhart b27cef2932 Mention support for date_part('week',timestamp).
Fix spelling of "millennium".
 Thanks to Mika Nystrom <mika@camembert.cs.caltech.edu>.
2000-04-14 15:08:56 +00:00
Tom Lane f0a2fc38ab Mention cube root. 2000-04-08 03:42:29 +00:00
Thomas G. Lockhart 9c075df519 Update some porting info.
Add mention of transcendental functions.
2000-04-08 02:16:08 +00:00
Bruce Momjian 28fb1c196b Update create_rule manual page. 2000-04-07 19:17:51 +00:00
Thomas G. Lockhart 30e355fc80 Fix path to initdb in installation instructions.
General cleanup for 7.0.
2000-04-07 13:30:58 +00:00
Thomas G. Lockhart f75bf1877a Accumulated fixups.
Add some chapters on new topics.
Change to referencing OASIS/Docbook v3.1 rather than Davenport/Docbook v3.0
Grepped for and fixed apparent tag mangling from emacs
 "Normalize" operation. Should be the last of those.
2000-03-30 22:22:41 +00:00
Thomas G. Lockhart 0b3214aca0 Add mention of join syntax to release notes, and reformat a few lines.
Update porting info. Still need a lot of platforms tested.
Fix small errors in markup.
2000-03-28 14:35:13 +00:00
Thomas G. Lockhart 39f69bc38f Start updating for the v7.0 release.
Use "generic functions" for math and other routines.
Use SQL92 "type 'literal'" syntax rather than Postgres "'literal'::type".
2000-03-27 17:14:43 +00:00
Tom Lane b9a990d8a8 Add exp(), ln(), and some other functions to numeric-functions table. 2000-03-20 04:20:52 +00:00
Bruce Momjian 394af52795 I'm sending patch with new version of to_char numbers formatting.
The PostgreSQL's to_char() is very compatible with Oracle's to_char
 now. I hope that to_char's 3000 rows of source is without bugs, but
 will good if anyone test it, for me it works very well :-)


                                                        Karel

----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-02-08 15:57:01 +00:00
Bruce Momjian b866d2e2d7 as attache of this mail is patch (to the main tree) with to_char's
family functions. Contain:

  conversion from a datetype to formatted text:

	to_char( datetime, 	text)
	to_char( timestamp,	text)
	to_char( int4,		text)
	to_char( int8,		text)
	to_char( float4,	text)
	to_char( float8,	text)
	to_char( numeric,	text)

  vice versa:

	to_date		( text, text)
	to_datetime	( text, text)
	to_timestamp	( text, text)
	to_number	( text, text)	   (convert to numeric)


  PostgreSQL to_char is very compatible with Oracle's to_char(), but not
total exactly (now). Small differentions are in number formating. It will
fix in next to_char() version.


! If will this patch aplly to the main tree, must be delete the current
  to_char version in contrib (directory "dateformat" and note in contrib's
  README), this patch not erase it (sorry Bruce).



The patch patching files:

	doc/src/sgml/func.sgml
                     ^^^^^^^^
   Hmm, I'm not sure if my English... :( Check it anyone (volunteer)?

   Thomas, it is right? SGML is not my primary lang  and compile
   the current PG docs tree is very happy job (hard variables setting in
   docs/sgml/Makefile --> HSTYLE= /home/users/t/thomas/....  :-)

   What add any definition to global configure.in and set Makefiles in docs
   tree via ./configure?

	src/backend/utils/adt/Makefile
	src/backend/utils/adt/formatting.c
	src/include/catalog/pg_proc.h
	src/include/utils/formatting.h
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-01-25 23:53:56 +00:00
Thomas G. Lockhart fe2f878173 Fix (mis)information about NULLIF() SQL function.
Thanks to Tom Lane for pointing it out.
1999-09-29 05:20:20 +00:00
Thomas G. Lockhart 5e84d58e70 Minor updates for release. 1999-06-14 07:36:12 +00:00
Thomas G. Lockhart 95e3cec621 Include mention of CASE, COALESCE, and IFNULL.
Add date/time parsing procedure (perhaps should be in appendix).
Add time zone information (ditto).
Update keyword list.
1999-05-12 07:32:47 +00:00
Thomas G. Lockhart f3fde99841 Augment info on string functions per Jose Soares' suggestions. 1999-01-19 16:11:18 +00:00
Thomas G. Lockhart a75f2d21a8 Clean up to ensure tag completion as required by the newest versions
of Norm's Modular Style Sheets and jade/docbook.
From Vince Vielhaber <vev@michvhf.com>.
1998-12-29 02:24:47 +00:00
Thomas G. Lockhart e9f10b22f4 Include new cidr and inet data types. 1998-10-27 06:14:41 +00:00