Re: array functions - request for opinions (was Re: [PATCHES] array

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: array functions - request for opinions (was Re: [PATCHES] array
Date: 2003-05-26 16:40:00
Message-ID: 2162.1053967200@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Conway <mail(at)joeconway(dot)com> writes:
> Tom Lane wrote:
>> In both cases I think it's mostly a matter of defining a defensible
>> behavior, which is probably not that hard, but no one's yet gotten
>> annoyed enough to try to fix it.

> It is probably easy enough to work around in the array concatenation
> functions. Would it be defensible to say that ('{}'::int4[] || 2) should
> produce ('{2}'::int4[]), i.e. a one-dimensional integer array with one
> element?

You would also have to assume that the subscript lower bound is one,
which doesn't bother me but is an additional bit of state that has to
appear out of nowhere. (In the assignment case you don't have to assume
that, since the subscript tells you what to do.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-05-26 16:50:10 Re: Bug(s) or not?
Previous Message Joe Conway 2003-05-26 16:32:12 Re: array functions - request for opinions (was Re: [PATCHES]