mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Cleanup of to_char() patch.
Brendan Jurd
This commit is contained in:
parent
c6ed4ead01
commit
f7a51b7a0d
@ -1,7 +1,7 @@
|
|||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
* formatting.c
|
* 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
|
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
|
||||||
@ -16,8 +16,9 @@
|
|||||||
* Cache & Memory:
|
* Cache & Memory:
|
||||||
* Routines use (itself) internal cache for format pictures.
|
* Routines use (itself) internal cache for format pictures.
|
||||||
*
|
*
|
||||||
* The cache uses a static buffers and is persistent across transactions.
|
* The cache uses a static buffer and is persistent across transactions. If
|
||||||
* If format-picture is bigger than cache buffer, parser is called always.
|
* the format-picture is bigger than the cache buffer, the parser is called
|
||||||
|
* always.
|
||||||
*
|
*
|
||||||
* NOTE for Number version:
|
* NOTE for Number version:
|
||||||
* All in this version is implemented as keywords ( => not used
|
* All in this version is implemented as keywords ( => not used
|
||||||
|
@ -720,11 +720,11 @@ SELECT '' AS "54", d1 as timestamptz,
|
|||||||
| Mon Jan 01 17:32:01 2001 PST | 1 | 1000 | 1000000
|
| Mon Jan 01 17:32:01 2001 PST | 1 | 1000 | 1000000
|
||||||
(56 rows)
|
(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( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
|
||||||
date_part( 'dow', d1) AS dow
|
date_part( 'dow', d1) AS dow
|
||||||
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
|
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
|
| Wed Dec 31 16:00:00 1969 PST | 1970 | 1 | 3
|
||||||
| Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
|
| Mon Feb 10 17:32:01 1997 PST | 1997 | 7 | 1
|
||||||
|
@ -169,7 +169,7 @@ SELECT '' AS "54", d1 as timestamptz,
|
|||||||
date_part( 'usec', d1) AS usec
|
date_part( 'usec', d1) AS usec
|
||||||
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
|
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( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week,
|
||||||
date_part( 'dow', d1) AS dow
|
date_part( 'dow', d1) AS dow
|
||||||
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
|
FROM TIMESTAMPTZ_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01';
|
||||||
|
Loading…
Reference in New Issue
Block a user