From: | Simon Connah <simon(dot)n(dot)connah(at)btopenworld(dot)com> |
---|---|
To: | rod(at)iol(dot)ie |
Cc: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: No serial type |
Date: | 2008-11-18 17:50:33 |
Message-ID: | 6F9123DC-C3CA-4128-9B92-FAA517612851@btopenworld.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 18 Nov 2008, at 17:40, Raymond O'Donnell wrote:
> On 18/11/2008 17:37, Scott Marlowe wrote:
>
>> create table a (i int primary key, info text);
>> create sequence a_i_seq;
>> alter table a alter column i set default nextval('a_i_seq');
>
> You'll also need to grant SELECT and UPDATE permissions on the
> sequence
> to the user that'll be INSERTing into the table.....this catches me
> regularly. :-)
>
> Ray.
Thanks guys. Looks like I misunderstood the manual. This is the first
time I've worked with
SQL and "proper" databases so still feeling a bit lost.
Simon.
"I disapprove of what you say, but I'll defend to the death your right
to say it." - Voltaire
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2008-11-18 17:51:08 | Re: Conversion of string to int using digits at beginning |
Previous Message | Sam Mason | 2008-11-18 17:48:47 | Re: MVCC and index-only read |