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

From Tom Lane
Subject Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Date
Msg-id 3529.1365048675@sss.pgh.pa.us
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)
Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
List pgsql-hackers
Brendan Jurd <direvus@gmail.com> writes:
> My thought was that on-disk zero-D arrays should be converted into
> empty 1-D arrays (with default lower bounds of course) when they are
> read by array_recv.

Huh?  array_recv would not get applied to datums coming off of disk.
The only way to make this 100% transparent would be to go through every
C-coded function that deals with arrays and make sure it delivers
identical results for both cases.  It's possible we could do that for
array functions in the core code, but what about user-written
extensions?

In any case, the whole exercise is pointless if we don't change the
visible behavior of array_dims et al.  So I think the idea that this
would be without visible consequence is silly.  What's up for argument
is just how much incompatibility is acceptable.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Page replacement algorithm in buffer cache
Next
From: Brendan Jurd
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)