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

From Bruce Momjian
Subject Re: Do we still need these NOTICEs?
Date
Msg-id 200207170324.g6H3OPH19314@candle.pha.pa.us
Whole thread Raw
In response to Re: Do we still need these NOTICEs?  (Joe Conway <mail@joeconway.com>)
List 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Do we still need these NOTICEs?
Next
From: Tom Lane
Date:
Subject: Re: DROP COLUMN