aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/date.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-02-16 03:39:46 +0000
committerBruce Momjian <bruce@momjian.us>2007-02-16 03:39:46 +0000
commit4ebb0cf9c30c1e477d5e2dfcc1f2c016c3f8bbcf (patch)
treefd6ce21ac074478e57b9f55ff378a4ae1a04d14f /src/backend/utils/adt/date.c
parentc7b08050d9a2b68b27045b36ff4c9a3db85a55e4 (diff)
downloadpostgresql-4ebb0cf9c30c1e477d5e2dfcc1f2c016c3f8bbcf.tar.gz
postgresql-4ebb0cf9c30c1e477d5e2dfcc1f2c016c3f8bbcf.zip
Add two new format fields for use with to_char(), to_date() and
to_timestamp(): - ID for day-of-week - IDDD for day-of-year This makes it possible to convert ISO week dates to and from text fully represented in either week ('IYYY-IW-ID') or day-of-year ('IYYY-IDDD') format. I have also added an 'isoyear' field for use with extract / date_part. Brendan Jurd
Diffstat (limited to 'src/backend/utils/adt/date.c')
-rw-r--r--src/backend/utils/adt/date.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 2360419bb77..c3a6415634b 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.127 2007/01/05 22:19:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.128 2007/02/16 03:39:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1748,6 +1748,7 @@ time_part(PG_FUNCTION_ARGS)
case DTK_DECADE:
case DTK_CENTURY:
case DTK_MILLENNIUM:
+ case DTK_ISOYEAR:
default:
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),