From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | Simon Connah <simon(dot)n(dot)connah(at)btopenworld(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: No serial type |
Date: | 2008-11-18 17:40:59 |
Message-ID: | 4922FE2B.9070603@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Broersma | 2008-11-18 17:41:41 | Re: MS Access and PostgreSQL - a warning to people thinking about it |
Previous Message | DANG Trieu | 2008-11-18 17:40:57 | Re: Slow queries when ORDER BY ... DESC with table inheritance (no index scan backwards) |