diff options
author | Bruce Momjian <bruce@momjian.us> | 2010-03-03 22:28:42 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2010-03-03 22:28:42 +0000 |
commit | ea066f87c3e98166639d9f08a15d5b551f62d3ed (patch) | |
tree | 3596f967f274a3f8fba06ffe85d1f1803a0f2f40 /src/backend/utils/adt/formatting.c | |
parent | 61d75116a72329ba50cb9e89379eaf5ceab02419 (diff) | |
download | postgresql-ea066f87c3e98166639d9f08a15d5b551f62d3ed.tar.gz postgresql-ea066f87c3e98166639d9f08a15d5b551f62d3ed.zip |
Document that "Q" is ignored by to_date and to_timestamp. Add C comment
about the behavior.
Document that quotes in to_date, to_timestamp, to_number skip input
characters.
Diffstat (limited to 'src/backend/utils/adt/formatting.c')
-rw-r--r-- | src/backend/utils/adt/formatting.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index e7e82a1b148..cc4f8137db0 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.168 2010/02/26 02:01:08 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.169 2010/03/03 22:28:42 momjian Exp $ * * * Portions Copyright (c) 1999-2010, PostgreSQL Global Development Group @@ -2671,10 +2671,12 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out) s += SKIP_THth(n->suffix); break; case DCH_Q: - /* - * We ignore Q when converting to date because it is not - * normative. + * We ignore 'Q' when converting to date because it is + * unclear which date in the quarter to use, and some + * people specify both quarter and month, so if it was + * honored it might conflict with the supplied month. + * That is also why we don't throw an error. * * We still parse the source string for an integer, but it * isn't stored anywhere in 'out'. |