Remove TypeName struct's timezone flag, which has been write-only storage
authorTom Lane
Fri, 21 Mar 2008 22:41:48 +0000 (22:41 +0000)
committerTom Lane
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 d943253266613809b10c59f4331d59799c9db863..c7a802b526c18fecf487f1aebb0557fe2e9a698a 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 a92911dc27e9ec817cb0ba5b3343ad64a346b8df..fd453fabd23c27f804cbb5a57132712669afb18f 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 ceb0eb607b7cbaae9005f527ae88ad3479a77b30..3eb2dd53b6a21f70a0c378b37da548fca1ca128a 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 01cc50428baf603f15c249bd0ebc516e1d001658..ac14c2f2c745511d38bd0b3a58740f3c8e30ae81 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 ff014383313cafa52d2b94eab8b60c016bfe6135..ce96f25ab0bac928a45376434bffc4f9d09162d3 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) */