Re: alter table serial->int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-- Simpler example for you

CREATE TABLE x (
   id serial NOT NULL
);

ALTER TABLE x alter id type int;

-- Under 8.1.10, a call to pg_dump will reveal the change has not happened


On Nov 8, 2007 11:13 AM, Erik Aronesty <erik@xxxxxxx> wrote:
> n Nov 7, 2007 12:11 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
> > "Erik Aronesty" <erik@xxxxxxx> writes:
> > > for some odd reason when i try to change a table fromserial to just
> > > plain "int with a default" postgres seems to ignore me.
> >
> > What PG version?
>
> (PostgreSQL) 8.1.10
>
> > The fact that you even tried that suggests that you don't understand
> > very well what "serial" is.  See the manual ...
>
> I tried to change the data type first.  Which implies I know what it means.
>

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux