Re: [HACKERS] DROPping tables with SERIALs

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] DROPping tables with SERIALs
Date: 1998-11-30 03:40:43
Message-ID: 366213BB.5C3AEE69@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pang-Hsin Wang 1998-11-30 03:47:44 ARP. ARP (Address Resolution Protocol i.e. Who are you)
Previous Message Terry Mackintosh 1998-11-30 02:39:59 Re: [HACKERS] How to see rules,functions and triggers in psql ?