Re: [HACKERS] DROPping tables with SERIALs - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] DROPping tables with SERIALs
Date
Msg-id 366213BB.5C3AEE69@krs.ru
Whole thread Raw
In response to Re: [HACKERS] DROPping tables with SERIALs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] DROPping tables with SERIALs
List pgsql-hackers
Tom Lane wrote:
> 
> >> Another question is whether a SERIAL field should automatically be
> >> UNIQUE (ie, create a unique index on it to prevent mistakes in manual
> >> insertion of values for the field).
> 
> > Once again - I would like to see SERIAL compatible with
> > SERIAL/IDENTY in other RDBMSes.
> 
> Yes, and?  What do the other ones do?

Ok, Sybase:

http://sybooks.sybase.com:80/dynaweb/group4/srg1100e/sqlug/@Generic__BookTextView/16622;pt=15743;lang=ru

Each table can include a single IDENTITY column. 
IDENTITY columns store sequential numbers such as invoice numbers, 
employee numbers, or record numbers that are generated automatically 
by SQL Server. The value of the IDENTITY column uniquely
identifies each row in a table.

Informix confuses me:

http://www.informix.com/answers/english/pdf_docs/gn7382/4365.pdf

The SERIAL data type is not automatically a unique column. 
You must apply a unique index to this column to prevent 
duplicate serial numbers. If you use the interactive schema 
editor in DB-Access to define the table, a unique index is 
applied automatically to a SERIAL column.

http://www.informix.com/answers/english/pdf_docs/gn7382/4366.pdf

You can specify a nonzero value for a serial column 
(as long as it does not duplicate any existing value in that column),
...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

?!!!

Vadim


pgsql-hackers by date:

Previous
From: Terry Mackintosh
Date:
Subject: Re: [HACKERS] How to see rules,functions and triggers in psql ?
Next
From: "Pang-Hsin Wang"
Date:
Subject: ARP. ARP (Address Resolution Protocol i.e. Who are you)