Re: Overloaded && operator from intarray module prevents index usage.

2019-03-01 Thread Andrew Gierth
> "Ron" == Ron writes: Ron> Arrays are -- by definition -- not atomic, and so they Ron> fundamentally break the model that relational databases are Ron> founded upon.  If you want to be a good database designer, don't Ron> use arrays. "In theory there is no difference between theory and

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Michael Lewis
I'll try to stay off your lawn. >

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Ron
On 2/28/19 10:26 PM, Michael Lewis wrote: Arrays are -- by definition -- not atomic, and so they fundamentally break the model that relational databases are founded upon.  If you want to be a good database designer, don't use arrays. Thanks. I was reading about Codd after your last

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Michael Lewis
> > Arrays are -- by definition -- not atomic, and so they fundamentally break > the model that relational databases are founded upon. If you want to be a > good database designer, don't use arrays. > Thanks. I was reading about Codd after your last email, but couldn't guess at which point was ob

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Ron
On 2/28/19 7:53 PM, Michael Lewis wrote: On Thu, Feb 28, 2019 at 4:57 PM Ron > wrote: On 2/28/19 4:53 PM, Michael Lewis wrote: [snip] Would a sixth option be to re-create the column as array type Codd is spinning in his grave... I'd hope he

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Michael Lewis
On Thu, Feb 28, 2019 at 4:57 PM Ron wrote: > On 2/28/19 4:53 PM, Michael Lewis wrote: > [snip] > > Would a sixth option be to re-create the column as array type > > > Codd is spinning in his grave... > I'd hope he would be fine with people asking questions to learn. I'm open to studying any sugg

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Ron
On 2/28/19 4:53 PM, Michael Lewis wrote: [snip] Would a sixth option be to re-create the column as array type Codd is spinning in his grave... -- Angular momentum makes the world go 'round.

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Michael Lewis
On Thu, Feb 28, 2019 at 3:34 PM Tom Lane wrote: > Michael Lewis writes: > > Can you dumb down how to change the index or column type such that an > index > > will be used for the && operator while intarray extension is installed? > We > > have the intarray extension installed and I doubt that I

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Tom Lane
Michael Lewis writes: > Can you dumb down how to change the index or column type such that an index > will be used for the && operator while intarray extension is installed? We > have the intarray extension installed and I doubt that I can get it > removed. There's no magic nice solution to this,

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Thomas Kellerer
Michael Lewis schrieb am 28.02.2019 um 21:23: Yeah, because it's an exact datatype match while the core operator is anyarray && anyarray which is not. Can you dumb down how to change the index or column type such that an index will be used for the && operator while intarray extension is

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Michael Lewis
> > Yeah, because it's an exact datatype match while the core operator > is anyarray && anyarray which is not. Can you dumb down how to change the index or column type such that an index will be used for the && operator while intarray extension is installed? We have the intarray extension install

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Tom Lane
Thomas Kellerer writes: > While testing a query on an integer array with a GIN index, I stumbled over a > behaviour which surprised me and which I would consider a bug - but maybe I > am wrong. It's not a bug --- the problem is that that operator is capturing your query reference, and it's not

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Thomas Kellerer
Andrew Gierth schrieb am 28.02.2019 um 10:29: > [intarray woes] > > Thomas> Is this expected behaviour? Is this caused by the Postgres core > Thomas> (e.g. the optimizer to taking the opclass into account) or is > Thomas> it a "problem" in the way the intarray module defines its > Thomas> oper

Re: Overloaded && operator from intarray module prevents index usage.

2019-02-28 Thread Andrew Gierth
> "Thomas" == Thomas Kellerer writes: [intarray woes] Thomas> Is this expected behaviour? Is this caused by the Postgres core Thomas> (e.g. the optimizer to taking the opclass into account) or is Thomas> it a "problem" in the way the intarray module defines its Thomas> operators? It's b