Re: [HACKERS] Bug in jsonb minus operator

2015-05-20 Thread Andrew Dunstan
On 05/19/2015 07:11 PM, Andrew Dunstan wrote: On 05/18/2015 10:52 PM, Peter Geoghegan wrote: On Mon, May 18, 2015 at 7:11 AM, Andrew Dunstan and...@dunslane.net wrote: Here's an patch along those lines. It seems to do the trick, at least for your test case, and it has the merit of being very

Re: [HACKERS] Bug in jsonb minus operator

2015-05-19 Thread Andrew Dunstan
On 05/18/2015 10:52 PM, Peter Geoghegan wrote: On Mon, May 18, 2015 at 7:11 AM, Andrew Dunstan and...@dunslane.net wrote: Here's an patch along those lines. It seems to do the trick, at least for your test case, and it has the merit of being very small, so small I'd like to backpatch it -

Re: [HACKERS] Bug in jsonb minus operator

2015-05-18 Thread Andrew Dunstan
On 05/18/2015 08:17 AM, Andrew Dunstan wrote: On 05/17/2015 09:08 PM, Peter Geoghegan wrote: On Sun, May 17, 2015 at 8:04 AM, Andrew Dunstan and...@dunslane.net wrote: Sure. I thought we'd covered this but it's possible that we didn't, or that it got rebroken. There have been complaints

Re: [HACKERS] Bug in jsonb minus operator

2015-05-18 Thread Andrew Dunstan
On 05/17/2015 09:08 PM, Peter Geoghegan wrote: On Sun, May 17, 2015 at 8:04 AM, Andrew Dunstan and...@dunslane.net wrote: Sure. I thought we'd covered this but it's possible that we didn't, or that it got rebroken. There have been complaints about the limitation on values containing jbvBinary,

Re: [HACKERS] Bug in jsonb minus operator

2015-05-18 Thread Peter Geoghegan
On Mon, May 18, 2015 at 7:11 AM, Andrew Dunstan and...@dunslane.net wrote: Here's an patch along those lines. It seems to do the trick, at least for your test case, and it has the merit of being very small, so small I'd like to backpatch it - accepting jbvBinary as is in pushJsonbValue seems

Re: [HACKERS] Bug in jsonb minus operator

2015-05-17 Thread Andrew Dunstan
On 05/16/2015 08:04 PM, Peter Geoghegan wrote: I'm seeing the following problem on the master branch: postgres=# select '{foo:5}'::jsonb - 'bar'; -- okay ?column? {foo: 5} (1 row) postgres=# select '{foo:{bar:5}}'::jsonb - 'foo'; -- okay ?column? -- {} (1 row)

Re: [HACKERS] Bug in jsonb minus operator

2015-05-17 Thread Peter Geoghegan
On Sun, May 17, 2015 at 8:04 AM, Andrew Dunstan and...@dunslane.net wrote: Sure. I thought we'd covered this but it's possible that we didn't, or that it got rebroken. There have been complaints about the limitation on values containing jbvBinary, so let's just remove it if that can be done