Re: array functions - request for opinions (was Re: [PATCHES]
От | Joe Conway |
---|---|
Тема | Re: array functions - request for opinions (was Re: [PATCHES] |
Дата | |
Msg-id | 3ED2418C.7070803@joeconway.com обсуждение исходный текст |
Ответ на | Re: array functions - request for opinions (was Re: [PATCHES] array (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: array functions - request for opinions (was Re: [PATCHES] array
|
Список | 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
В списке pgsql-hackers по дате отправления: