Re: Strategy for Primary Key Generation When Populating Table

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Strategy for Primary Key Generation When Populating Table
Date: 2012-02-09 20:50:46
Message-ID: alpine.LNX.2.00.1202091249550.5256@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 9 Feb 2012, Andy Colson wrote:

> If you create a serial column, dont put the column name or a value into your
> insert statement.
>
> create table junk (id serial, stuff text);
> insert into junk(stuff) values ('my stuff');

Andy,

That's what I assumed would work but did not know for sure.

Thanks,

Rich

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Vázquez 2012-02-09 21:25:51 initdb $PGDATA not working
Previous Message Gary Chambers 2012-02-09 18:55:30 Re: Warning: you don't own a lock of type ExclusiveLock