Re: [SQL] How to Convert Integer to Serial

Поиск
Список
Период
Сортировка
От Shoaib Mir
Тема Re: [SQL] How to Convert Integer to Serial
Дата
Msg-id AANLkTikj01goKZcoW2BTdWJce-jqp=-dL++ewkJgifLo@mail.gmail.com
обсуждение исходный текст
Ответ на How to Convert Integer to Serial  (venkat <ven.tammineni@gmail.com>)
Ответы Re: [SQL] How to Convert Integer to Serial  (venkat <ven.tammineni@gmail.com>)
Список pgsql-general
On Fri, Oct 29, 2010 at 4:05 PM, venkat <ven.tammineni@gmail.com> wrote:
ALTER TABLE Demotable ALTER COLUMN gid 
        SET DEFAULT nextval('serial'::regclass);


It is saying that ..serial does not exist...is that true ?



Please avoid sending emails to the personal email addresses but use the community mailing lists for that.

For the error you mentioned please follow the steps I mentioned in my last email as you are doing it the wrong way. 

Create a sequence first and then you can assign that sequence to this column. You can not assign SERIAL like this, it has to be a sequence name in there.  

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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: How to Convert Integer to Serial
Следующее
От: venkat
Дата:
Сообщение: Re: [SQL] How to Convert Integer to Serial