From adam.walczykiewicz@multiuser.com.pl Thu Jun 1 05:49:29 2000 Received: from mr1.ipartners.pl (IDENT@mr1.ipartners.pl [157.25.5.18]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA02745 for ; Thu, 1 Jun 2000 01:49:29 -0400 (EDT) (envelope-from adam.walczykiewicz@multiuser.com.pl) Received: from multiusnet (pb170.lodz.ppp.tpnet.pl [212.160.29.170]) by mr1.ipartners.pl (8.9.3/8.9.1/MR1.0) with SMTP id HAA69871 for ; Thu, 1 Jun 2000 07:49:26 +0200 (CEST) (envelope-from adam.walczykiewicz@multiuser.com.pl) Message-ID: <001701bfcb8c$e1ffa230$630000d2@Multiuser> From: "Adam Walczykiewicz" To: Subject: textpos() in postgreSQL 7.0 Date: Thu, 1 Jun 2000 07:47:32 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0013_01BFCB9D.A49A1A90" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2417.2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Archive-Number: 200006/4 This is a multi-part message in MIME format. ------=_NextPart_000_0013_01BFCB9D.A49A1A90 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0013_01BFCB9D.A49A1A90 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
Hi
I notice that string function textpos() doesn't exist i= n=20 postgreSQL 7.0. I have some
plpgsql functions written for 6.5.2 that use textpos() = and=20 when I tried to use them
in postgreSQL 7.0 I'v got error. Should I compile postg= reSQL=20 7.0 with more options
than -enable locale ?!!?
Thanks for any help.
Adam
 
------=_NextPart_000_0013_01BFCB9D.A49A1A90-- From reedstrm@rice.edu Thu Jun 1 14:10:59 2000 Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA53816 for ; Thu, 1 Jun 2000 10:10:59 -0400 (EDT) (envelope-from reedstrm@rice.edu) Received: by rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-sql@postgresql.org; Thu, 1 Jun 2000 09:10:55 -0500 (CDT) Date: Thu, 1 Jun 2000 09:10:55 -0500 From: "Ross J. Reedstrom" To: Adam Walczykiewicz Cc: pgsql-sql@postgresql.org Subject: Re: textpos() in postgreSQL 7.0 Message-ID: <20000601091055.A20245@rice.edu> Mail-Followup-To: Adam Walczykiewicz , pgsql-sql@postgresql.org References: <001701bfcb8c$e1ffa230$630000d2@Multiuser> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: <001701bfcb8c$e1ffa230$630000d2@Multiuser>; from adam.walczykiewicz@multiuser.com.pl on Thu, Jun 01, 2000 at 07:47:32AM +0200 X-Archive-Number: 200006/7 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., NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005