From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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] |
Date: | 2003-05-26 16:32:12 |
Message-ID: | 3ED2418C.7070803@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> You'd have to reference the underlying function.
That's what I thought, but I thought maybe I was missing something.
> I think what Peter is really asking is whether the implementation
> function for || will serve for this purpose, rather than making an
> additional one.
But, as I said in my other post a moment ago, that then implies (at
least to me) that the underlying function needs to be documented as an
"end user" function, rather than an "internal" one.
> That particular manifestation is not relevant; I think you mean this
> one:
>
> regression=# select '{}'::int4[] || 2; ERROR: Arrays greater than
> one-dimension are not supported
I just wanted to show that the issue pre-existed the new functions. I
think they are both caused by the fact that an empty array has *no*
dimensions (clearly the error message in the new array functions could
be better).
> 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?
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-05-26 16:40:00 | Re: array functions - request for opinions (was Re: [PATCHES] array |
Previous Message | Tom Lane | 2003-05-26 16:22:47 | Re: array functions - request for opinions (was Re: [PATCHES] array |