Select from array slices doesn't work

Started by PostgreSQL Bugs Listover 25 years ago2 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: Select from array slices doesn't work

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