Обсуждение: Bug in sequence dependency checking

Поиск
Список
Период
Сортировка

Bug in sequence dependency checking

От
Ruslan A Dautkhanov
Дата:

			
		

Re: Bug in sequence dependency checking

От
Tom Lane
Дата:
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

От
"Mendola Gaetano"
Дата:
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