insert into / select from / serial problem - Mailing list pgsql-sql

From tgh002
Subject insert into / select from / serial problem
Date
Msg-id 1123643026.939110.310310@g47g2000cwa.googlegroups.com
Whole thread Raw
Responses Re: insert into / select from / serial problem
Re: insert into / select from / serial problem
List pgsql-sql
I am using a insert statement like:

INSERT INTO newtable
SELECT field1, field2 FROM anothertable

newtable structure is: serial, varchar, varchar

What syntax do I use to insert the serial field?   Ive tried something
like:
INSERT INTO newtable
SELECT nextval('newtable_id_seq'), field1, field2 FROM anothertable
but that doesnt work

Any ideas?  Greatly appreciated!



pgsql-sql by date:

Previous
From: Jeff Lu
Date:
Subject: How to encrypt a column
Next
From: "Akshay Mathur"
Date:
Subject: sql function: using set as argument