Re: ALTER TABLE with TYPE serial does not work

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: ALTER TABLE with TYPE serial does not work
Дата
Msg-id 396486430901312004g50a68c15q33b7678029132861@mail.gmail.com
обсуждение исходный текст
Ответ на ALTER TABLE with TYPE serial does not work  (Andreas Wenk <a.wenk@netzmeister-st-pauli.de>)
Ответы Re: ALTER TABLE with TYPE serial does not work  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: ALTER TABLE with TYPE serial does not work  (Andreas Wenk <a.wenk@netzmeister-st-pauli.de>)
Список pgsql-general
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


--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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

Предыдущее
От: Reece Hart
Дата:
Сообщение: Re: Pet Peeves?
Следующее
От: "Adam Rich"
Дата:
Сообщение: Re: Pet Peeves