Thread: Bug in sequence dependency checking

Bug in sequence dependency checking

From
Ruslan A Dautkhanov
Date:

			
		

Re: Bug in sequence dependency checking

From
Tom Lane
Date:
Ruslan A Dautkhanov <rusland@scn.ru> writes:
>  PostgreSQL do not remove it's internal dependency when I DROP DEFAULT
>  (it was nextval(...)), so I still can't remove the sequence.

Ideally we'd prevent you from doing DROP DEFAULT, too.  That's mucking
with the internals of the SERIAL implementation.  Drop the column if you
don't want it anymore.

            regards, tom lane

Re: Bug in sequence dependency checking

From
"Mendola Gaetano"
Date:
Ruslan A Dautkhanov <rusland@scn.ru>  wrote:

> Hello all,
> PostgreSQL do not remove it's internal dependency when I DROP DEFAULT (it
was nextval(...)),
> so I still can't remove the sequence. Please see the real example bellow:

[ CUTTED ]

you did:
   alter table ttPrefixes alter ttid DROP DEFAULT;

may be inded you should do
   alter table ttPrefixes alter ttpid DROP DEFAULT;


in order to remove the serial
    public.ttprefixes_ttpid_seq



Regards
Gaetano