Search Postgresql Archives

Re: [SQL] How to Convert Integer to Serial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 29, 2010 at 4:05 PM, venkat <ven.tammineni@xxxxxxxxx> 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.  

Shoaib Mir
http://shoaibmir.wordpress.com/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux