Re: Is this a bug? (changing sequences in default value)

Поиск
Список
Период
Сортировка
От Fernando Schapachnik
Тема Re: Is this a bug? (changing sequences in default value)
Дата
Msg-id 20080513125027.GA1200@bal740r0.mecon.gov.ar
обсуждение исходный текст
Ответ на Re: Is this a bug? (changing sequences in default value)  ("Merlin Moncure" <mmoncure@gmail.com>)
Ответы Re: Is this a bug? (changing sequences in default value)
Список pgsql-general
En un mensaje anterior, Merlin Moncure escribió:
[...]
> >> > Am I doing something wrong?
> >>
> >> yes and no  when you created the table initially you probably made it
> >> a 'serial' column which set up the ownership that prevents the drop
> >> operation.  that ownership did not go away when you altered the
> >> default to the new serial.
> >>
> >> to fix this,
> >> alter sequence sequence table1_id_seq owned by none; -- now you can drop
> >
> > Hi, Merlin. Thanks for the tip, but it doesn't work. Every variation
> > of this syntax I tried gives me error as, apparently, it should:
> >
> > \h ALTER SEQUENCE
> > Command:     ALTER SEQUENCE
> > Description: change the definition of a sequence generator
> > Syntax:
> > ALTER SEQUENCE name [ INCREMENT [ BY ] increment ]
> >    [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO
> > MAXVALUE ]
> >    [ RESTART [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]
>
> oop, you are using 8.1 :-).  This was added in a later version.  drop
> sequence ... cascade should probably work.  you can try it out in a
> transaction to be sure.

Thanks for your help, but cascade doesn't make a difference.

Fernando.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Lionel"
Дата:
Сообщение: Re: Upgreade 8.3.0 to 8.3.1 on windows: insufficient privileges to install system service
Следующее
От: Glyn Astill
Дата:
Сообщение: Re: Stripping out slony after / before / during pg_restore?