Re: [SQL] Autogenerated Unique Index
От | Ross J. Reedstrom |
---|---|
Тема | Re: [SQL] Autogenerated Unique Index |
Дата | |
Msg-id | 20000307093245.B21828@rice.edu обсуждение исходный текст |
Ответ на | RE: [SQL] Autogenerated Unique Index (Andrzej Mazurkiewicz <andrzej.mazurkiewicz@polkomtel.com.pl>) |
Список | 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 по дате отправления: