Re: JSON Function Bike Shedding

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JSON Function Bike Shedding
Date: 2013-02-13 15:50:44
Message-ID: CAHyXU0zTsvnpkNwPm2Se_npho9O542hz5fXLHJzt6PzoASSmVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 12, 2013 at 1:18 PM, David E. Wheeler <david(at)justatheory(dot)com> wrote:

couple other suggestions:

> Existing Name Proposed Name
> -------------------------- ----------------------------------------
> json_array_length() array_length() or length() or size()

very much prefer without 'array_' prefix as this leads to semantic
confusion with our (generally badly named) array manipulation API.
So, length() -- also I see no reason why this can't be made to run if
the outermost container is an object but that's an acceptable
implementation detail.

> json_each() each_json()

why not each(). Assumption to return json is reasonable and doesn't
need decoration IMO.

> json_each_as_text() each_text()

like this

> json_get() get_json()

prefer get()

> json_get_as_text() get_text()

like this

> json_get_path() get_json()

get() please

> json_get_path_as_text() get_text()

like this

> json_object_keys() get_keys()

like this

> json_populate_record() record() or row()

to_record()

> json_populate_recordset() records() or rows()

to_recordset()

> json_unnest() get_values()

greatly prefer unwrap()

> json_agg() collect_json()

perfer to leave as json_agg() -- we have string_agg, array_agg, etc.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-02-13 15:51:47 Re: pg_xlogdump
Previous Message Atri Sharma 2013-02-13 15:49:26 Re: Fractal tree indexing