Thread: Select from array slices doesn't work

Select from array slices doesn't work

From
pgsql-bugs@postgresql.org
Date:
Kuba Ober (winnie@mika.fr.eu.org) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Select from array slices doesn't work

Long Description
When I try to select from array slices it gives strange qrPgSql error. Normal array indexing works, but slices don't.

Sample Code
> create table temp (arr varchar(20)[])
OK
> select arr[1:2] from temp
Error: qrPgSql: Parameter '2' not found
> select arr[1] from temp
OK

No file was uploaded with this report

Re: Select from array slices doesn't work

From
Tom Lane
Date:
pgsql-bugs@postgresql.org writes:
>> select arr[1:2] from temp
> Error: qrPgSql: Parameter '2' not found

What client frontend are you using?  It looks like the frontend is
trying to interpret :2 as a parameter.  I seem to recall that
psql had such a bug for a while during 7.0 development, but I
don't think it was in any release version.

BTW, I can't find any occurrence of such an error string in current
sources ...

            regards, tom lane