Обсуждение: Serials

Поиск
Список
Период
Сортировка

Serials

От
"Sharmad Naik"
Дата:
What's the purpose of Serials in Data types of postgres ?
TIA
Sharmad

Re: Serials

От
"Josh Berkus"
Дата:
Mr. Naik,

> What's the purpose of Serials in Data types of postgres ?
> TIA 
> Sharmad

This topic is more than adequately covered in both the
online documentation and Bruce Momjian's book.  If language
or other problems are preventing you from finding the
correct reference, please reply and I'll give you a pointer.
Othervwise, RTFM.

-Josh Berkus



Re: Serials

От
Thomas Swan
Дата:
At 1/12/2001 10:35 AM, Josh Berkus wrote:
>Mr. Naik,
>
> > What's the purpose of Serials in Data types of postgres ?
> > TIA
> > Sharmad

SERIAL is the same as makeing a column and then setting the default value
to a sequence.  If you insert and don't specify the column that is of type
serial it will have a new unique value on each insert.  The datatype in a 
serial
column is an int4.


>This topic is more than adequately covered in both the
>online documentation and Bruce Momjian's book.  If language
>or other problems are preventing you from finding the
>correct reference, please reply and I'll give you a pointer.
>Othervwise, RTFM.

These things are explained with little effort.  Granted sometimes these
are easily answered by consulting documentation, but sometimes all
anyone is looking for is a simple, quick answer.

Thomas