| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Joe Conway <mail(at)joeconway(dot)com> |
| Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Do we still need these NOTICEs? |
| Date: | 2002-07-17 04:10:31 |
| Message-ID: | 10954.1026879031@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Joe Conway <mail(at)joeconway(dot)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 like
nextval('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 syntax
first_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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hiroshi Inoue | 2002-07-17 04:11:42 | Re: DROP COLUMN |
| Previous Message | Tom Lane | 2002-07-17 04:04:01 | Re: DROP COLUMN |