Re: Do we still need these NOTICEs?

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

Joe Conway wrote:
> Bruce Momjian wrote:
> > Tom Lane wrote:
> >
> >>I am considering removing the following notices/warnings, since they
> >>seem to be unnecessary in the brave new world of dependencies:
>
> I also agree with removing all of these.
>
> >>* The ones about implicit indexes for primary key/unique constraints
> >>and about implicit sequences for SERIAL columns also seem unnecessary
> >>now --- as with the trigger case, you can't drop the implicit object
> >>directly anymore.
>
> 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? If so, does this create another dependency to
> prevent dropping the sequence, and hence the original (creating) table also?

My guess is that the dependency code will now track it(?). A harder
issue is if you use nextval() in the INSERT, there is no way for the
dependency code to know it is used by that table, so it will be dropped
if the parent table that created it is dropped. In such cases, the
sequence should always be created manually or a DEFAULT defined, even if
you never use it as a default.

--
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 04:04:01 Re: DROP COLUMN
Previous Message Joe Conway 2002-07-17 03:19:32 Re: Do we still need these NOTICEs?