Re: No serial type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: No serial type
Дата
Msg-id 22596.1227033473@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: No serial type  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Ответы Re: No serial type  (Erik Jones <ejones@engineyard.com>)
Список pgsql-general
"Scott Marlowe" <scott.marlowe@gmail.com> writes:
> On Tue, Nov 18, 2008 at 10:24 AM, Simon Connah
> <simon.n.connah@btopenworld.com> wrote:
>> But whenever I try and update my column to this type it says that it can not
>> find that data type. Am I doing something wrong?

> Serial is a "pseudotype".

Perhaps better to say it's a macro, which is currently recognized by
column creation but not ALTER COLUMN TYPE.  In recent versions you could
do "ALTER TABLE ADD COLUMN foo serial", if that helps.

I'm not sure if it'd be sensible to allow "ALTER COLUMN TYPE serial";
it seems like that might do more than you were expecting.  ALTER TYPE
is a pretty low-level operation, imo.

            regards, tom lane

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

Предыдущее
От: "Phoenix Kiula"
Дата:
Сообщение: Any risks in using FUNCTIONs (stored procedures) instead of raw sql queries?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Slow queries when ORDER BY ... DESC with table inheritance (no index scan backwards)