Re: Do we still need these NOTICEs?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joe Conway <mail(at)joeconway(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Do we still need these NOTICEs?
Date: 2002-07-17 05:29:26
Message-ID: 200207170529.g6H5TQL29386@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> 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.

OK, so creator tracks it, and referencers, even in DEFAULT, don't. Good
to know and probably something we need to point out in the release
notes.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-07-17 06:26:16 Re: DROP COLUMN
Previous Message Hiroshi Inoue 2002-07-17 05:26:18 Re: DROP COLUMN