diff options
| author | Thomas G. Lockhart <lockhart@fourpalms.org> | 2001-10-03 05:29:27 +0000 |
|---|---|---|
| committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 2001-10-03 05:29:27 +0000 |
| commit | 3e1beda2cde3495f41290e1ece5d544525810214 (patch) | |
| tree | 25a07c51bba4a23b3fd4e02261064146bb7c884c /src/backend/parser/analyze.c | |
| parent | a51de40fb60c0679d1987c25a2d3e47689be98d5 (diff) | |
| download | postgresql-3e1beda2cde3495f41290e1ece5d544525810214.tar.gz | |
Implement precision support for timestamp and time, both with and without
time zones.
SQL99 spec requires a default of zero (round to seconds) which is set
in gram.y as typmod is set in the parse tree. We *could* change to a
default of either 6 (for internal compatibility with previous versions)
or 2 (for external compatibility with previous versions).
Evaluate entries in pg_proc wrt the iscachable attribute for timestamp and
other date/time types. Try to recognize cases where side effects like the
current time zone setting may have an effect on results to decide whether
something is cachable or not.
Diffstat (limited to 'src/backend/parser/analyze.c')
| -rw-r--r-- | src/backend/parser/analyze.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 4f1bf724db..f8da1a4e1c 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.198 2001/09/07 21:57:53 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.199 2001/10/03 05:29:12 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -510,11 +510,10 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt) * No user-supplied value, so add a targetentry with DEFAULT * expr and correct data for the target column. */ - te = makeTargetEntry( - makeResdom(attrno, + te = makeTargetEntry(makeResdom(attrno, thisatt->atttypid, thisatt->atttypmod, - pstrdup(NameStr(thisatt->attname)), + pstrdup(NameStr(thisatt->attname)), false), stringToNode(defval[ndef].adbin)); qry->targetList = lappend(qry->targetList, te); |
