From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add CREATE support to event triggers |
Date: | 2014-10-28 10:00:07 |
Message-ID: | 20141028100007.GC2639@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-10-28 05:30:43 -0300, Alvaro Herrera wrote:
> > A couple of comments: this patch introduces a basic infrastructure able to
> > do the following set of operations:
> > - Obtention of parse tree using StashedCommand
> > - Reorganization of parse tree to become an ObjTree, with boolean, array
> > - Reorganization of ObjTree to a JsonB value
> > I am actually a bit doubtful about why we actually need this intermediate
> > ObjTree step... What would be wrong in manipulating a JSON(B) parsed tree,
> > that is first empty, and pushing key/value objects to it when processing
> > each command? Something moving toward in this direction is that ObjTree has
> > some logic to manipulate booleans, null values, etc. This results in some
> > duplication with what jsonb and json can actually do when creating when
> > manipulating strings, as well as the extra processing like
> > objtree_to_jsonb_element. ddl_json.c (should be ddl_jsonb.c?) would as well
> > take more its sense as it directly manipulates JSONB containers.
>
> Uhm. Obviously we didn't have jsonb when I started this and we do have
> them now, so I could perhaps see about updating the patch to do things
> this way; but I'm not totally sold on that idea, as my ObjTree stuff is
> a lot easier to manage and the jsonb API is pretty ugly.
I looked at this as well, and I think trying to do so would not result
in readable code.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | 'Andres Freund' | 2014-10-28 10:06:29 | Re: On partitioning |
Previous Message | Alvaro Herrera | 2014-10-28 09:56:56 | Re: alter user/role CURRENT_USER |