Re: [SQL] Autogenerated Unique Index

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: "'Antonio W(dot) Lagnada'" <alagnada(at)lsil(dot)com>
Cc: Pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [SQL] Autogenerated Unique Index
Date: 2000-03-07 15:32:45
Message-ID: 20000307093245.B21828@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, Mar 07, 2000 at 03:30:38PM +0100, Andrzej Mazurkiewicz wrote:
> cfmg_adm=> CREATE TABLE A (
> cfmg_adm(> B int NOT NULL,
> cfmg_adm(> C char(5),
> cfmg_adm(> PRIMARY KEY (B)
> cfmg_adm(> );
> NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'a_pkey' for
> table
> 'a'
> CREATE
> cfmg_adm=>

Hmm, I bet Antonio is looking for an automatic sequence type, rather
than the 'autogenerated index' that he asks about. That'd be like:

test=> create table A (
test-> B serial,
test-> C text);
NOTICE: CREATE TABLE will create implicit sequence 'a_b_seq' for SERIAL column 'a.b'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'a_b_key' for table 'a'
CREATE
test=>

If you need more, look for "SERIAL" in ther docs.

Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andrzej Mazurkiewicz 2000-03-07 15:37:30 RE: [SQL] Autogenerated Unique Index
Previous Message Antonio W. Lagnada 2000-03-07 15:29:22 Re: [SQL] Autogenerated Unique Index