From: Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
To: 'Antonio W. Lagnada' <alagnada@lsil.com>
Cc: Pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: [SQL] Autogenerated Unique Index
Date: Tue, 7 Mar 2000 09:32:45 -0600
Message-ID: <20000307093245.B21828@rice.edu> (raw)
In-Reply-To: <13288F4408ADD11186FF0060B06A431303648CA3@MSGWAW1>
References: <13288F4408ADD11186FF0060B06A431303648CA3@MSGWAW1>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: reedstrm@wallace.ece.rice.edu, alagnada@lsil.com
Subject: Re: [SQL] Autogenerated Unique Index
In-Reply-To: <20000307093245.B21828@rice.edu>
References: <13288F4408ADD11186FF0060B06A431303648CA3@MSGWAW1> <20000307093245.B21828@rice.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox