Re: JSON in 9.2 - Could we have just one to_json() function instead of two separate versions ? - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: JSON in 9.2 - Could we have just one to_json() function instead of two separate versions ?
Date
Msg-id CAHyXU0w-gZ+bU72Y=bQFwpeogUKQ66vEZd4D2jPjfuswWhDa0A@mail.gmail.com
Whole thread Raw
In response to JSON in 9.2 - Could we have just one to_json() function instead of two separate versions ?  (Hannu Krosing <hannu@2ndQuadrant.com>)
Responses Re: JSON in 9.2 - Could we have just one to_json() function instead of two separate versions ?
List pgsql-hackers
On Tue, May 1, 2012 at 7:02 AM, Hannu Krosing <hannu@2ndquadrant.com> wrote:
> Hi hackers
>
> After playing around with array_to_json() and row_to_json() functions a
> bit it I have a question - why do we even have 2 variants *_to_json()
>
> Collapsing array_to_json() and row_to_json() into just to_json()

I asked the same question.  It was noted that the xml functions aren't
overloaded like that and that it's cleaner to introduce datum specific
behaviors if you don't overload.

I don't really agree with that or any of the naming styles that are in
the form inputtype_func() but I think most people are on the other
side of the argument.

merlin


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Future In-Core Replication
Next
From: Peter Geoghegan
Date:
Subject: Re: proposal: additional error fields