Cleanup of to_char() patch.

Brendan Jurd
This commit is contained in:
Bruce Momjian 2007-02-17 01:51:42 +00:00
parent c6ed4ead01
commit f7a51b7a0d
3 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------
* formatting.c
*
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.126 2007/02/16 10:55:47 petere Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.127 2007/02/17 01:51:42 momjian Exp $
*
*
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
@ -16,8 +16,9 @@
* Cache & Memory:
* Routines use (itself) internal cache for format pictures.
*
* The cache uses a static buffers and is persistent across transactions.
* If format-picture is bigger than cache buffer, parser is called always.
* The cache uses a static buffer and is persistent across transactions. If
* the format-picture is bigger than the cache buffer, the parser is called
* always.
*
* NOTE for Number version:
* All in this version is implemented as keywords ( => not used

View File

@ -720,11 +720,11 @@ SELECT '' AS "54", d1 as timestamptz,
| Mon Jan 01 17:32:01 2001 PST | 1 | 1000 | 1000000
(56 rows)
SELECT '' AS "54", d1 as "timestamp",
SELECT '' AS "54", d1 as timestamptz,
date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
date_part( 'dow', d1) AS dow
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
54 | timestamp | isoyear | week | dow
54 | timestamptz | isoyear | week | dow
----+---------------------------------+---------+------+-----
| Wed Dec 31 16:00:00 1969 PST | 1970 | 1 | 3
| Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1

View File

@ -169,7 +169,7 @@ SELECT '' AS "54", d1 as timestamptz,
date_part( 'usec', d1) AS usec
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
SELECT '' AS "54", d1 as "timestamp",
SELECT '' AS "54", d1 as timestamptz,
date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
date_part( 'dow', d1) AS dow
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';