Re: [SQL] Autogenerated Unique Index - Mailing list pgsql-sql

From Ross J. Reedstrom
Subject Re: [SQL] Autogenerated Unique Index
Date
Msg-id 20000307093245.B21828@rice.edu
Whole thread Raw
In response to RE: [SQL] Autogenerated Unique Index  (Andrzej Mazurkiewicz <andrzej.mazurkiewicz@polkomtel.com.pl>)
List 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@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


pgsql-sql by date:

Previous
From: "Antonio W. Lagnada"
Date:
Subject: Re: [SQL] Autogenerated Unique Index
Next
From: Andrzej Mazurkiewicz
Date:
Subject: RE: [SQL] Autogenerated Unique Index