pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Bertheau <twanger@bluetwanger.de>
To: teknet@poczta.onet.pl
Cc: pgsql-admin@postgresql.org
Subject: standard IDENTITY support (Was: Re: SERIAL type not autoincremented)
Date: Mon, 05 Jul 2004 01:42:35 +0200
Message-ID: <1088984555.2767.16.camel@teetnang> (raw)
In-Reply-To: <20040702172227Z4873738-14310+28550@kps5.test.onet.pl>
References: <20040702172227Z4873738-14310+28550@kps5.test.onet.pl>

В Птн, 02.07.2004, в 19:22, teknet@poczta.onet.pl пишет:
> Hello
> i have:
> create table student(
> id                      SERIAL NOT NULL,
> name               VARCHAR(35) NOT NULL,
> primary key (id)
> );
> 
> and when i try to insert like this:
> insert into student (name) values('me');
> i receive error:
> ERROR:  duplicate key violates unique constraint "student_pkey"

Is this scenario possible in standard SQL identity columns? From what I
read here[1], a standard IDENTITY column can guarantee successful
insertion of a unique key. Is there similar support planned for
PostgreSQL?

Thanks.

-- 
Markus Bertheau <twanger@bluetwanger.de>




view thread (2+ messages)  latest in thread

Message-ID: <1088984555.2767.16.camel@teetnang>
Permalink:  ../1088984555.2767.16.camel@teetnang/
Also on:    postgresql.org/message-id/1088984555.2767.16.camel@teetnang

 · 

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 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-admin@postgresql.org
  Cc: twanger@bluetwanger.de, teknet@poczta.onet.pl
  Subject: Re: standard IDENTITY support (Was: Re: SERIAL type not autoincremented)
  In-Reply-To: <1088984555.2767.16.camel@teetnang>
  References: <20040702172227Z4873738-14310+28550@kps5.test.onet.pl> <1088984555.2767.16.camel@teetnang>

* 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