FYI, I tested your query in 8.3.X CVS and it worked so this fix will in
the next 8.3 minor release.
---
Corey Horton wrote:
> Is there any known workaround to get this the elements of the
> histogram_bounds anyarray in 8.3.
Fantastic - I'll just if/else the query based on db version.
Thanks!
Corey
Tom Lane wrote:
Corey Horton writes:
Is there any known workaround to get this the elements of the
histogram_bounds anyarray in 8.3.5.
It appears that you could explicitly cast to text and thence to text[]:
s
Corey Horton writes:
> Is there any known workaround to get this the elements of the
> histogram_bounds anyarray in 8.3.5.
It appears that you could explicitly cast to text and thence to text[]:
select array_to_string(histogram_bounds::text::text[], '-') from ...
but this might be too ugly for
Is there any known workaround to get this the elements of the
histogram_bounds anyarray in 8.3.5. If not, when might I expect a fix?
Just trying to plan our testing/release schedule of rolling out to 8.3
around this problem.
Thanks,
Corey
Tom Lane wrote:
I wrote:
While we could probabl
I wrote:
> While we could probably revert just enough of the changes to
> enforce_generic_type_consistency to allow this case again, I wonder
> just how safe that'd really be. It would amount to expecting that
> functions that take anyarray but don't take or return anyelement to
> not only work on
Greg Stark writes:
> Huh, I didn't realize that ever worked in the past. I thought the way
> to do what the op describes was to cast it to text[] or whatever
> datatype you from out-of-band knowledge to expect.
We don't seem to allow that either ...
regression=# select array_to_string(histog
Huh, I didn't realize that ever worked in the past. I thought the way
to do what the op describes was to cast it to text[] or whatever
datatype you from out-of-band knowledge to expect.
--
Greg
On 13 Dec 2008, at 19:38, Tom Lane wrote:
Corey Horton writes:
I'm trying to use array_to_st
Corey Horton writes:
> I'm trying to use array_to_string on the pg_stats column
> histogram_bounds...
> test83=# select array_to_string(histogram_bounds::anyarray, '-') from
> pg_stats where attname = 'id' and tablename = 'widgets';
> ERROR: argument declared "anyarray" is not an array but type
Help!
I'm trying to use array_to_string on the pg_stats column
histogram_bounds...
test83=# select array_to_string(histogram_bounds::anyarray, '-') from
pg_stats where attname = 'id' and tablename = 'widgets';
ERROR: argument declared "anyarray" is not an array but type anyarray
In 8.1, it
"Tom Lane" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Sabin Coanda" <[EMAIL PROTECTED]> writes:
>> I used the function array_to_string, and I found it ignores NULL values,
>> e.g. array_to_string( 'ARRAY[1,NULL,3]', ',' ) returns '1,3'.
>
> Do you have a better idea?
>
> regar
Tom Lane wrote:
Richard Huxton writes:
Tom Lane wrote:
"Sabin Coanda" <[EMAIL PROTECTED]> writes:
I used the function array_to_string, and I found it ignores NULL values,
e.g. array_to_string( 'ARRAY[1,NULL,3]', ',' ) returns '1,3'.
Do you have a better idea?
If you're being strict it shou
Richard Huxton writes:
> Tom Lane wrote:
>> "Sabin Coanda" <[EMAIL PROTECTED]> writes:
>>> I used the function array_to_string, and I found it ignores NULL values,
>>> e.g. array_to_string( 'ARRAY[1,NULL,3]', ',' ) returns '1,3'.
>>
>> Do you have a better idea?
> If you're being strict it shou
Tom Lane wrote:
"Sabin Coanda" <[EMAIL PROTECTED]> writes:
I used the function array_to_string, and I found it ignores NULL values,
e.g. array_to_string( 'ARRAY[1,NULL,3]', ',' ) returns '1,3'.
Do you have a better idea?
If you're being strict it should presumably return NULL for the whole
"Sabin Coanda" <[EMAIL PROTECTED]> writes:
> I used the function array_to_string, and I found it ignores NULL values,
> e.g. array_to_string( 'ARRAY[1,NULL,3]', ',' ) returns '1,3'.
Do you have a better idea?
regards, tom lane
---(end of broadcast
Hi there,
I used the function array_to_string, and I found it ignores NULL values,
e.g. array_to_string( 'ARRAY[1,NULL,3]', ',' ) returns '1,3'.
The function documentation doesn't explain this case.
So please tell me: is it the normal behavior or a bug ?
TIA,
Sabin
-
15 matches
Mail list logo