Re: [PATCH] Generic type subscription

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Generic type subscription
Date: 2016-10-01 09:52:34
Message-ID: CA+q6zcUwFuKUFbLUY3dK4q8SeBS9TWgpRZOck_xkJp53L8TXVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I've tried to compile this patch with current state of master (commit
> 51c3e9fade76c12) and found out that, when configured with
--enable-cassert,
> it doesn't pass make check.

Thanks for the feedback. Yes, unexpectedly for me, `ExecEvalExpr` can return
expanded `jbvArray` and `jbvObject` instead `jbvBinary` in both cases. It's
interesting, that this doesn't break anything, but obviously violates
the `pushJsonbValueScalar` semantics. I don't think `ExecEvalExpr` should be
changed for jsonb, we can handle this situation in `pushJsonbValue`
instead. I've
attached a new version of patch with this modification.

On 27 September 2016 at 19:08, Victor Wagner <vitus(at)wagner(dot)pp(dot)ru> wrote:

> On Fri, 9 Sep 2016 18:29:23 +0700
> Dmitry Dolgov <9erthalion6(at)gmail(dot)com> wrote:
>
> > Hi,
> >
> > Regarding to the previous conversations [1], [2], here is a patch
> > (with some improvements from Nikita Glukhov) for the generic type
> > subscription. It allows
> > to define type-specific subscription logic for any data type and has
> > implementations for the array and jsonb types. There are following
> > changes in this
> > patch:
>
> I've tried to compile this patch with current state of master (commit
> 51c3e9fade76c12) and found out that, when configured with
> --enable-cassert, it doesn't pass make check.
>
> LOG: server process (PID 4643) was terminated by signal 6: Aborted
> DETAIL: Failed process was running:
> update test_jsonb_subscript set test_json['a'] = '{"b":
> 1}'::jsonb;
>
>
>
> --
> Victor
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

Attachment Content-Type Size
generic_type_subscription_v2.patch text/x-patch 204.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-10-01 11:19:06 Re: PoC: Make it possible to disallow WHERE-less UPDATE and DELETE
Previous Message Thomas Munro 2016-10-01 07:28:29 Re: VACUUM's ancillary tasks