From: | Vadim Mikheev <vadim(at)krs(dot)ru> |
---|---|
To: | Frank Cusack <fcusack(at)iconnet(dot)net> |
Cc: | pgsql-bugs(at)postgreSQL(dot)org, PostgreSQL Developers List <hackers(at)postgreSQL(dot)org> |
Subject: | Re: [BUGS] uniqueness not always correct |
Date: | 1999-11-11 10:07:25 |
Message-ID: | 382A955D.56098552@krs.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-11-11 16:57:59 | Re: [HACKERS] Re: [BUGS] uniqueness not always correct |
Previous Message | Frank Cusack | 1999-11-11 09:14:03 | uniqueness not always correct |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 1999-11-11 15:35:58 | Re: [INTERFACES] Re: [HACKERS] CORBA STATUS |
Previous Message | Frank Cusack | 1999-11-11 09:14:03 | uniqueness not always correct |