pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Miroslav Šulc <miroslav.sulc@startnet.cz>
To: Sam Adams <samadams@myfastmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Serial and Index
Date: Sun, 27 Feb 2005 18:31:19 +0100
Message-ID: <422203E7.7010109@startnet.cz> (raw)
In-Reply-To: <1109508892.19366.216118816@webmail.messagingengine.com>
References: <1109508892.19366.216118816@webmail.messagingengine.com>

Documentation at 
http://www.postgresql.org/docs/8.0/interactive/datatype.html#DATATYPE-SERIAL 
says:

"In most cases you would also want to attach a UNIQUE or PRIMARY KEY 
constraint to prevent duplicate values from being inserted by accident, 
but this is not automatic."

and

"*Note: * Prior to PostgreSQL 7.3, serial implied UNIQUE. This is no 
longer automatic. If you wish a serial column to be in a unique 
constraint or a primary key, it must now be specified, same as with any 
other data type."

Miroslav Šulc, CEO
StartNet s.r.o.
----------------------------------------------------
Vrchlického 161/5, Praha 5, 150 00, Česká republika
----------------------------------------------------
ICQ: 60144073
web: www.startnet.cz, www.novavystavba.cz
----------------------------------------------------
mobil: +420 603 711 413
telefon: +420 257 225 602
----------------------------------------------------



Sam Adams wrote:

>I read at http://jamesthornton.com/postgres/FAQ/faq-english.html#4.15.1
>that when a serial is created then an index is created on the column.
>However I can't seem to find this anywhere in the PoistgreSQL manual. Is
>this true? Thanks.
>
>-Sam
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>  
>

Attachments:

miroslav.sulc.vcf (text/x-vcard, 401B) download begin:vcard fn;quoted-printable:Miroslav =C5=A0ulc n;quoted-printable:=C5=A0ulc;Miroslav org:StartNet s.r.o. adr;quoted-printable;quoted-printable:;;Vrchlick=C3=A9ho 161/5;Praha 5;;150 00;=C4=8Cesk=C3=A1 republika email;internet:miroslav.sulc@startnet.cz title:CEO tel;work:+420 257 225 602 tel;cell:+420 603 711 413 x-mozilla-html:TRUE url:http://www.startnet.cz version:2.1 end:vcard

view thread (7+ messages)  latest in thread

Message-ID: <422203E7.7010109@startnet.cz>
Permalink:  ../422203E7.7010109@startnet.cz/
Also on:    postgresql.org/message-id/422203E7.7010109@startnet.cz

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: miroslav.sulc@startnet.cz, samadams@myfastmail.com
  Subject: Re: Serial and Index
  In-Reply-To: <422203E7.7010109@startnet.cz>

* 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