OSDN Git Service

Remove TypeName struct's timezone flag, which has been write-only storage
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Mar 2008 22:41:48 +0000 (22:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Mar 2008 22:41:48 +0000 (22:41 +0000)
for a very long time --- in current usage it's entirely redundant with the
name field.

src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/parser/gram.y
src/include/nodes/parsenodes.h

index d943253..c7a802b 100644 (file)
@@ -15,7 +15,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.389 2008/03/20 21:42:47 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.390 2008/03/21 22:41:48 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1714,7 +1714,6 @@ _copyTypeName(TypeName *from)
 
        COPY_NODE_FIELD(names);
        COPY_SCALAR_FIELD(typeid);
-       COPY_SCALAR_FIELD(timezone);
        COPY_SCALAR_FIELD(setof);
        COPY_SCALAR_FIELD(pct_type);
        COPY_NODE_FIELD(typmods);
index a92911d..fd453fa 100644 (file)
@@ -18,7 +18,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.319 2008/03/20 21:42:48 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.320 2008/03/21 22:41:48 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1753,7 +1753,6 @@ _equalTypeName(TypeName *a, TypeName *b)
 {
        COMPARE_NODE_FIELD(names);
        COMPARE_SCALAR_FIELD(typeid);
-       COMPARE_SCALAR_FIELD(timezone);
        COMPARE_SCALAR_FIELD(setof);
        COMPARE_SCALAR_FIELD(pct_type);
        COMPARE_NODE_FIELD(typmods);
index ceb0eb6..3eb2dd5 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.323 2008/03/20 21:42:48 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.324 2008/03/21 22:41:48 tgl Exp $
  *
  * NOTES
  *       Every node type that can appear in stored rules' parsetrees *must*
@@ -1668,7 +1668,6 @@ _outTypeName(StringInfo str, TypeName *node)
 
        WRITE_NODE_FIELD(names);
        WRITE_OID_FIELD(typeid);
-       WRITE_BOOL_FIELD(timezone);
        WRITE_BOOL_FIELD(setof);
        WRITE_BOOL_FIELD(pct_type);
        WRITE_NODE_FIELD(typmods);
index 01cc504..ac14c2f 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.609 2008/03/20 21:42:48 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.610 2008/03/21 22:41:48 tgl Exp $
  *
  * HISTORY
  *       AUTHOR                        DATE                    MAJOR EVENT
@@ -7198,10 +7198,6 @@ ConstDatetime:
                                                $$ = SystemTypeName("timestamptz");
                                        else
                                                $$ = SystemTypeName("timestamp");
-                                       /* XXX the timezone field seems to be unused
-                                        * - thomas 2001-09-06
-                                        */
-                                       $$->timezone = $5;
                                        $$->typmods = list_make1(makeIntConst($3));
                                        $$->location = @1;
                                }
@@ -7211,10 +7207,6 @@ ConstDatetime:
                                                $$ = SystemTypeName("timestamptz");
                                        else
                                                $$ = SystemTypeName("timestamp");
-                                       /* XXX the timezone field seems to be unused
-                                        * - thomas 2001-09-06
-                                        */
-                                       $$->timezone = $2;
                                        $$->location = @1;
                                }
                        | TIME '(' Iconst ')' opt_timezone
index ff01438..ce96f25 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.360 2008/03/20 21:42:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.361 2008/03/21 22:41:48 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -165,7 +165,6 @@ typedef struct TypeName
        NodeTag         type;
        List       *names;                      /* qualified name (list of Value strings) */
        Oid                     typeid;                 /* type identified by OID */
-       bool            timezone;               /* timezone specified? */
        bool            setof;                  /* is a set? */
        bool            pct_type;               /* %TYPE specified? */
        List       *typmods;            /* type modifier expression(s) */