Re: [BUGS] uniqueness not always correct

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [BUGS] uniqueness not always correct
Дата
Msg-id 199912081145.GAA16764@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] uniqueness not always correct  (Vadim Mikheev <vadim@krs.ru>)
Список pgsql-hackers
Can someone comment on this?  Can someone submit a patch?  I remember
something about not clearing bits somewhere.

I can't reproduce the problem on BSD/OS.


> Frank Cusack wrote:
> >
> > Solaris 2.6/sparc; postgres 6.5.1
> >
> > dns=> create table test (zone int4, net cidr, unique(zone, net));
> > NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
> > CREATE
> > dns=> insert into test (zone, net) values (1, '1.2.3/24');
> > INSERT 21750 1
> > dns=> insert into test (zone, net) values (1, '2.3.4/24');
> > INSERT 21751 1
> > dns=> insert into test (zone, net) values (1, '1.2.3/24');
> > INSERT 21752 1
> > dns=> insert into test (zone, net) values (1, '2.3.4/24');
> > ERROR:  Cannot insert a duplicate key into a unique index
>
> Yes, I reproduced this (Solaris 2.5/sparc).
> Seems like CIDR problem(??!):
>
> ais=> create table test (zone int4, net int4, unique(zone, net));
>                                         ^^^^
> NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'test_zone_key' for table 'test'
> CREATE
> ais=> insert into test (zone, net) values (1, 1);
> INSERT 7712479 1
> ais=> insert into test (zone, net) values (1, 2);
> INSERT 7712480 1
> ais=> insert into test (zone, net) values (1, 1);
> ERROR:  Cannot insert a duplicate key into a unique index
>
> Vadim
>
> ************
>
>


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] uniqueness not always correct
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Multibyte in autoconf