Re: Do we still need these NOTICEs? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Do we still need these NOTICEs?
Date
Msg-id 10954.1026879031@sss.pgh.pa.us
Whole thread Raw
In response to Re: Do we still need these NOTICEs?  (Joe Conway <mail@joeconway.com>)
Responses Re: Do we still need these NOTICEs?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> One thing I wondered about here -- is it still possible to use a 
> sequence, which is autogenerated by a SERIAL column, as the default 
> value for another table?

Sure, same as before.

> If so, does this create another dependency to 
> prevent dropping the sequence, and hence the original (creating) table also?

As the code stands, no.  The other table's default would look likenextval('first_table_col_seq')
and the dependency deducer only sees nextval() and a string constant
in this.

Someday I'd like to see us support the Oracle-ish syntaxfirst_table_col_seq.nextval
which would expose the sequence reference in a way that allows the
system to understand it during static examination of a query.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: DROP COLUMN
Next
From: "J. R. Nield"
Date:
Subject: Re: Issues Outstanding for Point In Time Recovery (PITR)