Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL) - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date
Msg-id FF060A90-9E7C-4980-88CF-B80F7B1A4D7A@justatheory.com
Whole thread Raw
In response to Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Brendan Jurd <direvus@gmail.com>)
Responses Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)  (Brendan Jurd <direvus@gmail.com>)
List pgsql-hackers
On Jun 12, 2013, at 8:00 PM, Brendan Jurd <direvus@gmail.com> wrote:

> array_dims - Returns the dimensions of the array, unless it is empty
> in which case NULL.
> array_proper_dims - Returns the dimensions of the array.
> array_ndims - Returns the number of dimension, unless it is empty in
> which case NULL.
> array_proper_ndims - Returns the number of dimensions.
>
> ... and so on for _length, _upper and _lower.

Similar things should have dissimilar names. I propose:

<bikeshedding>
    Old      |    New
--------------+--------------array_dims   | array_descarray_ndims  | array_deptharray_length | array_sizearray_lower  |
array_startarray_upper | array_finish 

The last two are meh, but it’s a place to start…

</bikeshedding>

David




pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: [PATCH] Remove useless USE_PGXS support in contrib
Next
From: Fujii Masao
Date:
Subject: Re: Clean switchover