Subscripts in select statements

From: Scott Holmes <sholmes(at)pacificnet(dot)net>
To: pgsql-general(at)postgresql(dot)org (PG-General)
Subject: Subscripts in select statements
Date: 2000-07-25 00:18:39
Message-ID: 200007250018.RAA11633@scotts.mynetwork.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an select statement inherited from an Informix-4GL application. I
would like to know if there is a way to retain it in Postgresql:

select count(*) from people where peopcode[1,2] = a_var

This sort of subscripting is apparently illegal. I realize I can change the
code to " ...peopcode like a_var + "%"", but to do this I would need to make a
number of other code changes I'd like to avoid if possible.

Thanks, Scott

Browse pgsql-general by date

  From Date Subject
Next Message Chris Bitmead 2000-07-25 01:01:48 Re: 4 billion record limit?
Previous Message Tom Lane 2000-07-25 00:18:28 Re: Statistical Analysis