Re: ALTER TABLE with TYPE serial does not work
От | Andreas Wenk |
---|---|
Тема | Re: ALTER TABLE with TYPE serial does not work |
Дата | |
Msg-id | 49860311.5020805@netzmeister-st-pauli.de обсуждение исходный текст |
Ответ на | Re: ALTER TABLE with TYPE serial does not work (Richard Broersma <richard.broersma@gmail.com>) |
Список | pgsql-general |
Richard Broersma schrieb: > On Sat, Jan 31, 2009 at 3:16 PM, Andreas Wenk > <a.wenk@netzmeister-st-pauli.de> wrote: > >> Why does this not work: >> >> postgres=# ALTER TABLE tab1 ALTER COLUMN nr TYPE serial; >> ERROR: type "serial" does not exist > > serial is really just "short-hand" for making an integer column use > default incrementing function. The following will fully explain what > it is so that you can alter the column: > http://www.postgresql.org/docs/8.3/interactive/datatype-numeric.html#DATATYPE-SERIAL > > Thanks Richard, that helped. I thought maybe there is another reason because when I create a table and use serial as "type" (like I would when I use integer) it works well. I know that searial is just for my convenience as written in the manual. I failed to understand, that it is not really a type. Cheers Andy -- St.Pauli - Hamburg - Germany Andreas Wenk
В списке pgsql-general по дате отправления: