Re: Built-in binning functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Built-in binning functions
Date
Msg-id 22103.1409528923@sss.pgh.pa.us
Whole thread Raw
In response to Re: Built-in binning functions  (David G Johnston <david.g.johnston@gmail.com>)
Responses Re: Built-in binning functions
List pgsql-hackers
David G Johnston <david.g.johnston@gmail.com> writes:
> Since "bucket" is the 'verb' here (in this specific case meaning "lookup the
> supplied value in the supplied bucket definition") and "width" is a modifier
> (the bucket specification describes an equal-width structure) I suggest
> "literal_bucket(val, array[])" such that the bucket is still the verb but
> now the modifier describes a structure that is literally provided.

It's a very considerable stretch to see "bucket" as a verb here :-).
Maybe that's why the SQL committee's choice of function name seems
so unnatural (to me anyway).

I was wondering about bucket_index(), ie "get the index of the bucket
this value falls into".  Or get_bucket(), or get_bucket_index() if you
like verbosity.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Built-in binning functions
Next
From: David Johnston
Date:
Subject: Re: Built-in binning functions