Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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'
> 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'

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

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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group