Re: ALTER TABLE with TYPE serial does not work - Mailing list pgsql-general

From Andreas Wenk
Subject Re: ALTER TABLE with TYPE serial does not work
Date
Msg-id 49860144.1000405@netzmeister-st-pauli.de
Whole thread Raw
In response to Re: ALTER TABLE with TYPE serial does not work  (Jasen Betts <jasen@xnet.co.nz>)
List pgsql-general
Jasen Betts schrieb:
> On 2009-01-31, Andreas Wenk <a.wenk@netzmeister-st-pauli.de> wrote:
>> Hi List,
>>
>> I have a short question to psql.
>>
>> Why does this not work:
>>
>> postgres=# ALTER TABLE tab1 ALTER COLUMN nr TYPE serial;
>> ERROR:  type "serial" does not exist
>>
>> but this:
>>
>> postgres=# ALTER TABLE tab1 DROP COLUMN nr;
>> ALTER TABLE
>> postgres=# ALTER TABLE tab1 ADD COLUMN nr serial;
>> NOTICE:  ALTER TABLE will create implicit sequence "tab1_nr_seq" for
>> serial column "tab1.nr"
>> ALTER TABLE
>
> because serial isn't a type.
>
ah - I think this is what the error message says ;-/ ... ?? !!

--

St.Pauli - Hamburg - Germany

Andreas Wenk

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Pet Peeves
Next
From: "Adam Rich"
Date:
Subject: Re: Pet Peeves