From: Bruce Momjian Date: Sat, 17 Feb 2007 01:51:42 +0000 (+0000) Subject: Cleanup of to_char() patch. X-Git-Tag: REL8_3_BETA1~1190 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7a51b7a0d09bf11342b833347bc275eb4d102f4;p=postgresql Cleanup of to_char() patch. Brendan Jurd --- diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 5a13a4c4f4..0a746a0738 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -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 diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out index 4b1cdcf269..3f117ec084 100644 --- a/src/test/regress/expected/timestamptz.out +++ b/src/test/regress/expected/timestamptz.out @@ -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 diff --git a/src/test/regress/sql/timestamptz.sql b/src/test/regress/sql/timestamptz.sql index e5d70b38b0..73c5bde5f3 100644 --- a/src/test/regress/sql/timestamptz.sql +++ b/src/test/regress/sql/timestamptz.sql @@ -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';