On Thu, Jan 16, 2020 at 7:33 AM Robert Haas <robertmh...@gmail.com> wrote: >
> > 0002 does some basic header cleanup to make it possible to include the > existing header file jsonapi.h in frontend code. The state of the JSON > headers today looks generally poor. There seems not to have been much > attempt to get the prototypes for a given source file, say foo.c, into > a header file with the same name, say foo.h. Also, dependencies > between various header files seem to be have added somewhat freely. > This patch does not come close to fixing all that, but I consider it a > modest down payment on a cleanup that probably ought to be taken > further. > > 0003 splits json.c into two files, json.c and jsonapi.c. All the > lexing and parsing stuff (whose prototypes are in jsonapi.h) goes into > jsonapi.c, while the stuff that pertains to the 'json' data type > remains in json.c. This also seems like a good cleanup, because to me, > at least, it's not a great idea to mix together code that is used by > both the json and jsonb data types as well as other things in the > system that want to generate or parse json together with things that > are specific to the 'json' data type. > I'm probably responsible for a good deal of the mess, so let me say Thankyou. I'll have a good look at these. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services