Skip to content

Commit 7249562

Browse files
committed
Remove redundant code, update comments, cause CURRENT_TIME to
agree with CURRENT_TIME(n).
1 parent c7c280f commit 7249562

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/backend/parser/gram.y

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.259 2001/10/05 06:37:42 thomas Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.260 2001/10/08 18:16:59 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHOR DATE MAJOR EVENT
@@ -4921,7 +4921,6 @@ c_expr: attr
49214921
t->setof = FALSE;
49224922
t->typmod = -1;
49234923

4924-
d = makeNode(TypeName);
49254924
d->name = xlateSqlType("date");
49264925
d->setof = FALSE;
49274926
d->typmod = -1;
@@ -4931,7 +4930,7 @@ c_expr: attr
49314930
| CURRENT_TIME
49324931
{
49334932
/*
4934-
* Translate as "time('now'::text)".
4933+
* Translate as "timetz('now'::text)".
49354934
* See comments for CURRENT_DATE.
49364935
*/
49374936
A_Const *s = makeNode(A_Const);
@@ -4946,8 +4945,7 @@ c_expr: attr
49464945
t->setof = FALSE;
49474946
t->typmod = -1;
49484947

4949-
d = makeNode(TypeName);
4950-
d->name = xlateSqlType("time");
4948+
d->name = xlateSqlType("timetz");
49514949
d->setof = FALSE;
49524950
d->typmod = 0;
49534951

@@ -4956,7 +4954,7 @@ c_expr: attr
49564954
| CURRENT_TIME '(' Iconst ')'
49574955
{
49584956
/*
4959-
* Translate as "time('now'::text)".
4957+
* Translate as "timetz('now'::text)".
49604958
* See comments for CURRENT_DATE.
49614959
*/
49624960
A_Const *s = makeNode(A_Const);
@@ -4971,7 +4969,6 @@ c_expr: attr
49714969
t->setof = FALSE;
49724970
t->typmod = -1;
49734971

4974-
d = makeNode(TypeName);
49754972
d->name = xlateSqlType("timetz");
49764973
d->setof = FALSE;
49774974
if (($3 < 0) || ($3 > 13))
@@ -5002,7 +4999,6 @@ c_expr: attr
50024999
/* SQL99 mandates a default precision of 6
50035000
* for timestamp. - thomas 2001-10-04
50045001
*/
5005-
d = makeNode(TypeName);
50065002
d->name = xlateSqlType("timestamptz");
50075003
d->setof = FALSE;
50085004
d->typmod = 6;
@@ -5012,7 +5008,7 @@ c_expr: attr
50125008
| CURRENT_TIMESTAMP '(' Iconst ')'
50135009
{
50145010
/*
5015-
* Translate as "timestamp('now'::text)".
5011+
* Translate as "timestamptz('now'::text)".
50165012
* See comments for CURRENT_DATE.
50175013
*/
50185014
A_Const *s = makeNode(A_Const);
@@ -5027,7 +5023,6 @@ c_expr: attr
50275023
t->setof = FALSE;
50285024
t->typmod = -1;
50295025

5030-
d = makeNode(TypeName);
50315026
d->name = xlateSqlType("timestamptz");
50325027
d->setof = FALSE;
50335028
if (($3 < 0) || ($3 > 13))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy