Hitesh Patel wrote:
>
> > If you really don't want to update your app's code just yet, you can
> > install a pg_proc entry that defines textpos() with a CREATE FUNCTION
> > command. But the long-term answer is to fix your code to conform with
> > the standard.
> >
> > regards, tom lane
>
> I changed my code to use position() instead of textpos(), the only
> problem is that I now get a parse error at the following line:
>
> i:= position(stringa, ',');
>
> The exact error message is:
>
> ERROR: parser: parse error at or near ","
>
> Trying to run a query like, 'select position(email, ',') from table'
> fails with the same parse error, however 'select strpos(email, ',') from
> table' runs fine...
>
> any hints?
This is from memory, so please verify with the docs, but I
believe the SQL92 standared is something like:
SELECT position(',' in stringa) ...
Hope that helps,
Mike Mascari