X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 83D8CD1B1D2 for ; Sun, 4 Jul 2004 20:42:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74996-04 for ; Sun, 4 Jul 2004 23:42:40 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id 6AEF6D1B1B0 for ; Sun, 4 Jul 2004 20:42:34 -0300 (ADT) Received: from [192.168.0.1] (dsl-082-082-191-188.arcor-ip.net [82.82.191.188]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id i64NgXa32198; Mon, 5 Jul 2004 01:42:33 +0200 Subject: standard IDENTITY support (Was: Re: SERIAL type not autoincremented) From: Markus Bertheau To: teknet@poczta.onet.pl Cc: pgsql-admin@postgresql.org In-Reply-To: <20040702172227Z4873738-14310+28550@kps5.test.onet.pl> References: <20040702172227Z4873738-14310+28550@kps5.test.onet.pl> Content-Type: text/plain; charset=UTF-8 Message-Id: <1088984555.2767.16.camel@teetnang> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 05 Jul 2004 01:42:35 +0200 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/62 X-Sequence-Number: 14130 =D0=92 =D0=9F=D1=82=D0=BD, 02.07.2004, =D0=B2 19:22, teknet@poczta.onet.pl = =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Hello > i have: > create table student( > id SERIAL NOT NULL, > name VARCHAR(35) NOT NULL, > primary key (id) > ); >=20 > 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. --=20 Markus Bertheau