On Mon, Dec 21, 2015 at 1:00 PM, Scott Marlowe
wrote:
> On Sun, Dec 20, 2015 at 11:39 PM, Sterpu Victor wrote:
> > Thank you.
> >
> > I used the syntax with 2 indexes, it works for me.
> > But why does NULL != NULL?
>
> Because NULL literally means "an unknown, possibly unknowable value."
>
> Yo
On Sun, Dec 20, 2015 at 11:39 PM, Sterpu Victor wrote:
> Thank you.
>
> I used the syntax with 2 indexes, it works for me.
> But why does NULL != NULL?
Because NULL literally means "an unknown, possibly unknowable value."
You need to stop thinking of NULL as A value. It is not.
--
Sent via pg
t;Sterpu Victor"
Cc: "Marc Mamin" ; "PostgreSQL General"
; "Andreas Kretschmer"
; "Scott Marlowe"
Sent: 12/21/2015 8:44:14 AM
Subject: Re: [GENERAL] Unique index problem
2015-12-21 7:39 GMT+01:00 Sterpu Victor :
Thank you.
I used the synta
"Marc Mamin"
> To: "Sterpu Victor"
> Cc: "PostgreSQL General" ; "Andreas
> Kretschmer" ; "Scott Marlowe" <
> scott.marl...@gmail.com>
> Sent: 12/20/2015 11:44:35 PM
> Subject: AW: [GENERAL] Unique index problem
>
/20/2015 11:44:35 PM
Subject: AW: [GENERAL] Unique index problem
pgsql-general-ow...@postgresql.org
[pgsql-general-ow...@postgresql.org]" im Auftrag von "Scott
Marlowe [scott.marl...@gmail.com]
ndet: Sonntag, 20. Dezember 2015 17:02
Sterpu Victor
Po
On 12/20/15 10:18 AM, Andreas Kretschmer wrote:
test=*# create unique index on foo(a,b,c) where a is not null and b is
not null and c is not null;
CREATE INDEX
As you discovered, you'd have to build separate indexes for each of the
nullable fields:
UNIQUE ON (a,b) WHERE c IS NULL
a,c WHERE b
pgsql-general-ow...@postgresql.org [pgsql-general-ow...@postgresql.org]"
im Auftrag von "Scott Marlowe [scott.marl...@gmail.com]
ndet: Sonntag, 20. Dezember 2015 17:02
Sterpu Victor
PostgreSQL General
eff: Re: [GENERAL] Unique index problem
un, De
Andreas Kretschmer wrote:
> Andreas Kretschmer wrote:
>
> >
> > Maybe there are better solutions, it's a quick hack ;-)
>
> better solution:
sorry, doesn't work =:(
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
Andreas Kretschmer wrote:
>
> Maybe there are better solutions, it's a quick hack ;-)
better solution:
test=*# create unique index on foo(a,b,c) where a is not null and b is
not null and c is not null;
CREATE INDEX
(partial index)
Andreas
--
Really, I'm not out to destroy Microsoft. That w
Sterpu Victor wrote:
> Hello
>
> I created a unique index that doesn't seem to work when one column is NULL.
> Index is created like this: CREATE UNIQUE INDEX lab_tests_groups_siui_uni ON
> lab_tests_groups_siui(id_lab_tests_siui, id_lab_tests_groups, valid_from,
> id_lab_sample_types);
> Now I
On Sun, Dec 20, 2015 at 9:00 AM, Scott Marlowe wrote:
> On Sun, Dec 20, 2015 at 8:50 AM, Sterpu Victor wrote:
>> Hello
>>
>> I created a unique index that doesn't seem to work when one column is NULL.
>> Index is created like this: CREATE UNIQUE INDEX lab_tests_groups_siui_uni ON
>> lab_tests_gro
On Sun, Dec 20, 2015 at 8:50 AM, Sterpu Victor wrote:
> Hello
>
> I created a unique index that doesn't seem to work when one column is NULL.
> Index is created like this: CREATE UNIQUE INDEX lab_tests_groups_siui_uni ON
> lab_tests_groups_siui(id_lab_tests_siui, id_lab_tests_groups, valid_from,
>
Hello
I created a unique index that doesn't seem to work when one column is
NULL.
Index is created like this: CREATE UNIQUE INDEX
lab_tests_groups_siui_uni ON lab_tests_groups_siui(id_lab_tests_siui,
id_lab_tests_groups, valid_from, id_lab_sample_types);
Now I can run this insert twice and I w
13 matches
Mail list logo