Create Table Unique problem... bug?

Поиск
Список
Период
Сортировка
От Mauro Bertoli
Тема Create Table Unique problem... bug?
Дата
Msg-id 20030528132619.49833.qmail@web13402.mail.yahoo.com
обсуждение исходный текст
Список 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
(2,null,'a');

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
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/

В списке pgsql-novice по дате отправления:

Предыдущее
От: "ling"
Дата:
Сообщение: FOR UPDATE NOWAIT
Следующее
От: Юрий Морозов
Дата:
Сообщение: UPPER / lower