Search Postgresql Archives

Re: A couple of newbie questions ...

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

 



On 23/07/2008 11:01, Raymond O'Donnell wrote:
On 23/07/2008 10:48, admin wrote:
1. Is a SEQUENCE what I use instead of auto_increment?

Yes. The easiest thing is to define the column as type SERIAL - this will create the sequence for you and associate it with the column. Alternatively, you can create the sequence by hand, create the column as an integer type, and then set the default for the column as

I forgot to mention that you'll need to grant SELECT and UPDATE permissions on the sequence to the user that'll be accessing the table - this still catches me betimes. :-)

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@xxxxxx
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------


[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