pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
textpos() in postgreSQL 7.0
2+ messages / 2 participants
[nested] [flat]

* textpos() in postgreSQL 7.0
@ 2000-06-01 05:47 Adam Walczykiewicz <adam.walczykiewicz@multiuser.com.pl>
  2000-06-01 14:10 ` Re: textpos() in postgreSQL 7.0 Ross J. Reedstrom <reedstrm@rice.edu>
  0 siblings, 1 reply; 2+ messages in thread

From: Adam Walczykiewicz @ 2000-06-01 05:47 UTC (permalink / raw)
  To: pgsql-sql

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. Should I compile postgreSQL 7.0 with more
options
than -enable locale ?!!?
Thanks for any help.
Adam

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: textpos() in postgreSQL 7.0
  2000-06-01 05:47 textpos() in postgreSQL 7.0 Adam Walczykiewicz <adam.walczykiewicz@multiuser.com.pl>
@ 2000-06-01 14:10 ` Ross J. Reedstrom <reedstrm@rice.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Ross J. Reedstrom @ 2000-06-01 14:10 UTC (permalink / raw)
  To: Adam Walczykiewicz <adam.walczykiewicz@multiuser.com.pl>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-06-01 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-06-01 05:47 textpos() in postgreSQL 7.0 Adam Walczykiewicz <adam.walczykiewicz@multiuser.com.pl>
2000-06-01 14:10 ` Ross J. Reedstrom <reedstrm@rice.edu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox