]> granicus.if.org Git - postgresql/commitdiff
Forgot to handle column length defaults in ALTER TABLE ADD COLUMN.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Jan 2000 01:22:48 +0000 (01:22 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Jan 2000 01:22:48 +0000 (01:22 +0000)
src/backend/parser/analyze.c

index a4c2dd7eff93d98e26831f35e42e35884e0b3025..56da67c4540d55e7a7855b997ab1e60ab2aea552 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- *     $Id: analyze.c,v 1.131 2000/01/20 02:24:50 tgl Exp $
+ *     $Id: analyze.c,v 1.132 2000/01/22 01:22:48 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -178,6 +178,18 @@ transformStmt(ParseState *pstate, Node *parseTree)
                        }
                        break;
 
+               case T_AlterTableStmt:
+                       {
+                               AlterTableStmt *n = (AlterTableStmt *) parseTree;
+
+                               result = makeNode(Query);
+                               result->commandType = CMD_UTILITY;
+                               if (n->subtype == 'A') /* ADD COLUMN */
+                                       transformColumnType(pstate, (ColumnDef *) n->def);
+                               result->utilityStmt = (Node *) parseTree;
+                       }
+                       break;
+
                        /*------------------------
                         *      Optimizable statements
                         *------------------------