Re: it's a feature, but it feels like a bug

2018-02-08 Thread Rafal Pietrak
W dniu 08.02.2018 o 05:51, David Fetter pisze: > On Wed, Feb 07, 2018 at 10:26:50PM -0500, Tom Lane wrote: >> Rafal Pietrak writes: [-] > > CREATE TABLE foo(b BOOLEAN, i INTEGER NOT NULL, t TEXT NOT NULL) PARTITION BY > LIST (b); > CREATE TABLE foo_true PARTITION OF foo (PRIMARY KE

Re: it's a feature, but it feels like a bug

2018-02-08 Thread Rafal Pietrak
W dniu 08.02.2018 o 04:26, Tom Lane pisze: > Rafal Pietrak writes: [] > >> And it is sort of "couterintuitive" - as you can see, there is a UNIQUE >> index for test(a,b) target; admitedly partial, but why should that >> matter? > > Because the index fails to guarantee

Re: it's a feature, but it feels like a bug

2018-02-07 Thread David Fetter
On Wed, Feb 07, 2018 at 10:26:50PM -0500, Tom Lane wrote: > Rafal Pietrak writes: > > ztk=# create table test (a int, b int, c int, d bool, e int, primary key > > (a,b,c,d)); > > CREATE TABLE > > ztk=# create unique index leftone on test (a,b) where d is true; > > CREATE INDEX > > ztk=# create uni

Re: it's a feature, but it feels like a bug

2018-02-07 Thread Tom Lane
Rafal Pietrak writes: > ztk=# create table test (a int, b int, c int, d bool, e int, primary key > (a,b,c,d)); > CREATE TABLE > ztk=# create unique index leftone on test (a,b) where d is true; > CREATE INDEX > ztk=# create unique index rightone on test (b,c) where d is false; > CREATE INDEX > ztk=

Re: it's a feature, but it feels like a bug

2018-02-07 Thread David G. Johnston
On Wednesday, February 7, 2018, Rafal Pietrak wrote: > Hi, > > I've bumped onto the following problem: > -screenshot > ztk=# create table test (a int, b int, c int, d bool, e int, primary key > (a,b,c,d)); > CREATE TABLE > ztk=# create unique index

it's a feature, but it feels like a bug

2018-02-07 Thread Rafal Pietrak
Hi, I've bumped onto the following problem: -screenshot ztk=# create table test (a int, b int, c int, d bool, e int, primary key (a,b,c,d)); CREATE TABLE ztk=# create unique index leftone on test (a,b) where d is true; CREATE INDEX ztk=# create uniqu