Re: BUG #1434: ERROR: type "bigserial" does not exist

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #1434: ERROR: type "bigserial" does not exist
Дата
Msg-id 20050124140349.GB28988@dcc.uchile.cl
обсуждение исходный текст
Ответ на BUG #1434: ERROR: type "bigserial" does not exist  ("Brad Snobar" <bradsnobar@netscape.net>)
Ответы Re: BUG #1434: ERROR: type "bigserial" does not exist  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-bugs
On Sat, Jan 22, 2005 at 10:28:16PM +0000, Brad Snobar wrote:

> The column was a primary key bigint.
>
> ALTER TABLE "public"."CategoryBuildingRankSchemas"
>   ALTER COLUMN "IDCategoryBuildingRankSchema" TYPE BIGSERIAL;
>
> ERROR:  type "bigserial" does not exist

Bigserial is not a type.  Rather, it's a type "with strings
attached".  You can achieve the same effect by using

alter table foo alter column a type bigint,
      alter column a set default nextval('seq');

Sadly, you have to create the sequence by hand, and it won't be dropped
when the table is dropped.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Right now the sectors on the hard disk run clockwise, but I heard a rumor that
you can squeeze 0.2% more throughput by running them counterclockwise.
It's worth the effort. Recommended."  (Gerry Pourwelle)

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: 8.0.0 gmake check fails if on disk, passes on ram disk....
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1429: stats tests fails