Re: JSON Function Bike Shedding - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: JSON Function Bike Shedding
Date
Msg-id 511ABBBA.9090309@agliodbs.com
Whole thread Raw
In response to JSON Function Bike Shedding  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: JSON Function Bike Shedding  ("David E. Wheeler" <david@justatheory.com>)
Re: JSON Function Bike Shedding  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
David,

> However, I am not so keen on the function names. They all start with
> json_! This mostly feels redundant to me, since the types of the
> parameters are part of the function signature.

I have no opinion about starting the function names with json_ or not.
If we decide not, I agree that in general your proposed names are
reasonable.  Except:

> json_populate_record()
> record() or row() 

> json_populate_recordset()       records() or
> rows() 

Given that row() is already a type-agnostic function, and RECORD is a
stored procedure return meta-type, I think the above names would be a
mistake.  I'd suggest instead:

json_to_record() and json_to_recordset()
or:

to_record(json) and to_recordset(json)

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: JSON Function Bike Shedding
Next
From: "David E. Wheeler"
Date:
Subject: Re: JSON Function Bike Shedding