[SQLObject] Re: PostgreSQL question: Unique and Indices?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Bud P. B. <bu...@si...> - 2003-04-10 14:30:25
|
Just played around with psql to answer to myself: Yes, both UNIQUE and PRIMARY KEY imply the definition of an index: cico=# create table bud( cico(# id INT PRIMARY KEY); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'bud_pkey' for table 'bud' cico=# create table bbb( cico(# id INT UNIQUE); NOTICE: CREATE TABLE / UNIQUE will create implicit index 'bbb_id_key' for table 'bbb' --b On Thu, 10 Apr 2003 15:49:40 +0200 Bud P. Bruegger <bu...@si...> wrote: > PostgresSQL people out there, > > does anyone know whether using UNIQUE and PRIMARY KEY automatically > creates a unique index? > > thanks > --b > > /----------------------------------------------------------------- > | Bud P. Bruegger, Ph.D. > | Sistema (www.sistema.it) > | Via U. Bassi, 54 > | 58100 Grosseto, Italy > | +39-0564-411682 (voice and fax) > \----------------------------------------------------------------- /----------------------------------------------------------------- | Bud P. Bruegger, Ph.D. | Sistema (www.sistema.it) | Via U. Bassi, 54 | 58100 Grosseto, Italy | +39-0564-411682 (voice and fax) \----------------------------------------------------------------- |