Skip site navigation (1) Skip section navigation (2)

Create Table Unique problem... bug?

From: Mauro Bertoli <bertolima(at)yahoo(dot)it>
To: pgsql-novice(at)postgresql(dot)org
Subject: Create Table Unique problem... bug?
Date: 2003-05-28 13:34:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi, I've a problem creating a table. My Sql
instruction is:

CREATE TABLE questiontypes (
  id integer NOT NULL, 
  flags integer,
  label text,
  UNIQUE (id,flags) 

Is it ok?? I must have 'flags' like to NULL... but
'id' is NOT NULL...
Now if I insert a row:

INSERT INTO questiontypes (id,flags,label) values

and re-insert it... I can!!!! Now there are two
identical row, and UNIQUE?? 
I think postgres must occur an error? Is it Ok?

(The same problem is with: 
INSERT INTO questiontypes (id,label) values (2,'a');
Is it ok?)

Thanks you, Mauro

Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro Anti-spam


pgsql-novice by date

Next:From: Nabil SayeghDate: 2003-05-28 13:50:26
Subject: Re: Create Table Unique problem... bug?
Previous:From: Mauro BertoliDate: 2003-05-28 13:26:19
Subject: Create Table Unique problem... bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group