diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-12 00:07:15 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-10-12 00:07:15 +0000 |
commit | f9e6e27c873bcf50fdc20f5a28c5bede66d18f25 (patch) | |
tree | f6514d7b7c968982c25b00008c43289c6e2df1e1 /src/backend/tcop/utility.c | |
parent | e98476eb032bd4dc32ca97212b660cad0bbadef4 (diff) |
Break transformCreateStmt() into multiple routines and make
transformAlterStmt() use these routines, instead of having lots of
duplicate (not to mention should-have-been-duplicate) code.
Adding a column with a CHECK constraint actually works now,
and the tests to reject unsupported DEFAULT and NOT NULL clauses
actually fire now. ALTER TABLE ADD PRIMARY KEY works, modulo
having to have created the column(s) NOT NULL already.
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 84a12a33e04..6822fe803bd 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.119 2001/10/09 14:00:22 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.120 2001/10/12 00:07:14 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -450,7 +450,7 @@ ProcessUtility(Node *parsetree, case 'C': /* ADD CONSTRAINT */ AlterTableAddConstraint(stmt->relname, interpretInhOption(stmt->inhOpt), - stmt->def); + (List *) stmt->def); break; case 'X': /* DROP CONSTRAINT */ AlterTableDropConstraint(stmt->relname, |