From: | Fernando Schapachnik <fernando(at)mecon(dot)gov(dot)ar> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Is this a bug? (changing sequences in default value) |
Date: | 2008-05-13 12:50:27 |
Message-ID: | 20080513125027.GA1200@bal740r0.mecon.gov.ar |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Glyn Astill | 2008-05-13 13:02:54 | Re: Stripping out slony after / before / during pg_restore? |
Previous Message | Gurjeet Singh | 2008-05-13 12:37:41 | Re: Stripping out slony after / before / during pg_restore? |