Re: jsonb, collection & postgres_fdw

2020-08-24 Thread Ashutosh Bapat
On Tue, 18 Aug 2020 at 17:36, Ashutosh Bapat wrote: > On Mon, Aug 17, 2020 at 7:32 PM Bharath Rupireddy > wrote: > > > > On Fri, Aug 14, 2020 at 12:46 PM Konstantin Knizhnik < > k.knizh...@postgrespro.ru> wrote: > > > > > > Right now postgres_fdw treat as shippable only builtin functions or > >

Re: jsonb, collection & postgres_fdw

2020-08-18 Thread Ashutosh Bapat
On Mon, Aug 17, 2020 at 7:32 PM Bharath Rupireddy wrote: > > On Fri, Aug 14, 2020 at 12:46 PM Konstantin Knizhnik > wrote: > > > > Right now postgres_fdw treat as shippable only builtin functions or > > functions from extensions explicitly specified as shippable extensions > > in parameters of t

Re: jsonb, collection & postgres_fdw

2020-08-17 Thread Bharath Rupireddy
On Fri, Aug 14, 2020 at 12:46 PM Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > > Right now postgres_fdw treat as shippable only builtin functions or > functions from extensions explicitly specified as shippable extensions > in parameters of this FDW server. So I do no see a problem her

Re: jsonb, collection & postgres_fdw

2020-08-14 Thread Tom Lane
Konstantin Knizhnik writes: > I still do not completely understand current criteria of shippable > functions. > I understood Tom's explanation, but: > postgres=# create table t1(t text collate "C"); > CREATE TABLE > postgres=# create foreign table ft1(t text collate "ru_RU") server > pg_fdw opt

Re: jsonb, collection & postgres_fdw

2020-08-14 Thread Konstantin Knizhnik
On 14.08.2020 09:40, Bharath Rupireddy wrote: On Thu, Aug 13, 2020 at 8:54 PM Konstantin Knizhnik wrote: Right now jsonb functions are treated as non-shippable by postgres_fdw and so predicates with them are not pushed down to foreign server: I wonder if there is some way of making postgres

Re: jsonb, collection & postgres_fdw

2020-08-13 Thread Bharath Rupireddy
On Thu, Aug 13, 2020 at 8:54 PM Konstantin Knizhnik wrote: > > Right now jsonb functions are treated as non-shippable by postgres_fdw > and so predicates with them are not pushed down to foreign server: > > I wonder if there is some way of making postgres_fdw to push this this > function to foreig

Re: jsonb, collection & postgres_fdw

2020-08-13 Thread Tom Lane
Konstantin Knizhnik writes: > Or funccollid=0 doesn't mean that collations of function arguments do > not affect function behavior? No, it does not. As I said already, there is no way to tell from outside a function whether it pays attention to collation or not. funccollid is the collation to

Re: jsonb, collection & postgres_fdw

2020-08-13 Thread Konstantin Knizhnik
On 13.08.2020 20:00, Tom Lane wrote: Konstantin Knizhnik writes: Right now jsonb functions are treated as non-shippable by postgres_fdw and so predicates with them are not pushed down to foreign server: Yeah, that's kind of annoying, but breaking the collation check is not an acceptable fix

Re: jsonb, collection & postgres_fdw

2020-08-13 Thread Tom Lane
Konstantin Knizhnik writes: > Right now jsonb functions are treated as non-shippable by postgres_fdw > and so predicates with them are not pushed down to foreign server: Yeah, that's kind of annoying, but breaking the collation check is not an acceptable fix. And what you're proposing *does* br

jsonb, collection & postgres_fdw

2020-08-13 Thread Konstantin Knizhnik
Hi hackers, Right now jsonb functions are treated as non-shippable by postgres_fdw and so predicates with them are not pushed down to foreign server: create table jt(content jsonb); create extension postgres_fdw; create server pg_fdw  FOREIGN DATA WRAPPER postgres_fdw options(host '127.0.0.1'