Re: textpos() in postgreSQL 7.0 - Mailing list pgsql-sql

From Ross J. Reedstrom
Subject Re: textpos() in postgreSQL 7.0
Date
Msg-id 20000601091055.A20245@rice.edu
Whole thread Raw
In response to textpos() in postgreSQL 7.0  ("Adam Walczykiewicz" <adam.walczykiewicz@multiuser.com.pl>)
List pgsql-sql
Adam - 
Looks like it was renamed to strpos() in 7.0. A quick compatability 
hack to get up and running until you can rewrite the code would be to 
do something like:

CREATE FUNCTION textpos (text,text) RETURNS int AS 'SELECT strpos($1,$2)'
LANGUAGE 'SQL';

Now all your old code will work, just a little slower.

Ross

On Thu, Jun 01, 2000 at 07:47:32AM +0200, Adam Walczykiewicz wrote:
> Hi
> I notice that string function textpos() doesn't exist in postgreSQL 7.0. I
> have some
> plpgsql functions written for 6.5.2 that use textpos() and when I tried to
> use them
> in postgreSQL 7.0 I'v got error. 
-- 
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


pgsql-sql by date:

Previous
From: Jason.Weiss@smed.com
Date:
Subject: SQL Server and C++ Data Types
Next
From: Bruce Momjian
Date:
Subject: Re: SQL'92 web resources