summaryrefslogtreecommitdiff
path: root/src/backend/parser/analyze.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-07-16 22:12:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-07-16 22:12:20 +0000
commit5af19e4227c4b1a1879956eb891af61469d3f8ba (patch)
tree3cc5204c0800d43e0b24864908778771a2562eda /src/backend/parser/analyze.c
parentcdebcad6af70ec13bd89f11cf7f3d8b7d5278f50 (diff)
Add more dependency insertions --- this completes the basic pg_depend
functionality. Of note: dropping a table that has a SERIAL column defined now drops the associated sequence automatically.
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r--src/backend/parser/analyze.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 2fbca505987..6337b61f2ac 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.238 2002/07/12 18:43:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.239 2002/07/16 22:12:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -848,6 +848,12 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
cxt->blist = lappend(cxt->blist, seqstmt);
/*
+ * Mark the ColumnDef so that during execution, an appropriate
+ * dependency will be added from the sequence to the column.
+ */
+ column->support = makeRangeVar(snamespace, sname);
+
+ /*
* Create appropriate constraints for SERIAL. We do this in full,
* rather than shortcutting, so that we will detect any
* conflicting constraints the user wrote (like a different