aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-01-31 01:08:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-01-31 01:08:08 +0000
commitbd96dd118403c6e05486c1060745956ca2ee4466 (patch)
tree04227c7e2ad040a7cd8b361b37cfe49a4c5f342e /src/backend/utils
parent37b247a5e93321b309d71c84d8f9d5dc1c098e3f (diff)
downloadpostgresql-bd96dd118403c6e05486c1060745956ca2ee4466.tar.gz
postgresql-bd96dd118403c6e05486c1060745956ca2ee4466.zip
Allow a time zone to be specified (and silently ignored) in the input
for type 'time without time zone', as we already did for type 'timestamp without time zone'. This patch was proposed by Tom Lockhart on 7-Nov-02, but he never got around to applying it. Adjust regression tests and documentation to match.
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/adt/date.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 90f41ad817d..09d0e9aa256 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.77 2003/01/29 01:08:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.78 2003/01/31 01:08:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -511,6 +511,7 @@ time_in(PG_FUNCTION_ARGS)
fsec_t fsec;
struct tm tt,
*tm = &tt;
+ int tz;
int nf;
char lowstr[MAXDATELEN + 1];
char *field[MAXDATEFIELDS];
@@ -521,7 +522,7 @@ time_in(PG_FUNCTION_ARGS)
elog(ERROR, "Bad time external representation (too long) '%s'", str);
if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
- || (DecodeTimeOnly(field, ftype, nf, &dtype, tm, &fsec, NULL) != 0))
+ || (DecodeTimeOnly(field, ftype, nf, &dtype, tm, &fsec, &tz) != 0))
elog(ERROR, "Bad time external representation '%s'", str);
tm2time(tm, fsec, &result);