Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu [128.42.12.154]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA75172 for ; Tue, 7 Mar 2000 10:32:49 -0500 (EST) (envelope-from reedstrm@wallace.ece.rice.edu) Received: by wallace.ece.rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-sql@postgresql.org; Tue, 7 Mar 2000 09:32:45 -0600 (CST) Date: Tue, 7 Mar 2000 09:32:45 -0600 From: "Ross J. Reedstrom" To: "'Antonio W. Lagnada'" Cc: Pgsql-sql Subject: Re: [SQL] Autogenerated Unique Index Message-ID: <20000307093245.B21828@rice.edu> References: <13288F4408ADD11186FF0060B06A431303648CA3@MSGWAW1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: <13288F4408ADD11186FF0060B06A431303648CA3@MSGWAW1>; from andrzej.mazurkiewicz@polkomtel.com.pl on Tue, Mar 07, 2000 at 03:30:38PM +0100 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., NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005