Re: A couple of newbie questions ...

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: A couple of newbie questions ...
Дата
Msg-id 488702FC.2020403@iol.ie
обсуждение исходный текст
Ответ на Re: A couple of newbie questions ...  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
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@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: A couple of newbie questions ...
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: A couple of newbie questions ...