Received: from gumby.usu.edu (gumby.usu.edu [129.123.1.117]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eAUNMrF25867 for ; Thu, 30 Nov 2000 18:22:53 -0500 (EST) (envelope-from rmello@cc.usu.edu) Received: from cc.usu.edu ("port 1639"@slxwy.dorms.usu.edu [129.123.236.160]) by cc.usu.edu (PMDF V5.2-32 #30472) with ESMTP id <01JX5OKDTG2I8ZF38R@cc.usu.edu> for pgsql-sql@postgresql.org; Thu, 30 Nov 2000 16:23:12 MDT Date: Thu, 30 Nov 2000 16:25:15 -0700 From: Roberto Mello Subject: Re: String function page incorrect? To: Jonathan Ellis Cc: pgsql-sql@postgresql.org Message-id: <3A26E1DB.2C8B34FB@cc.usu.edu> MIME-version: 1.0 X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16 i586) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en, pt-BR References: <5.0.2.1.2.20001130113826.082b4ec0@pop.mindspring.com> <3A268A5C.91CB7353@wgcr.org> <14886.40191.455322.734798@onceler.kciLink.com> <017c01c05b05$5729dfa0$0d00a8c0@dsl.inconnect.com> X-Archive-Number: 200011/295 X-Sequence-Number: 326 Jonathan Ellis wrote: > > I'm trying to find the correct function that returns the location of a > substring within a string. Looking at > http://www.postgresql.org/docs/user/x2731.htm, it gives the Function name as > "textpos" but in the Example column it uses "position". But neither one > works! > > bf2=# select position('high', 'ig'); > ERROR: parser: parse error at or near "," You need SELECT position('ig' in 'high'); lbn=# select position('ig' in 'high'); strpos -------- 2 (1 row) -Roberto -- Computer Science Utah State University Space Dynamics Laboratory Web Developer USU Free Software & GNU/Linux Club http://fslc.usu.edu My home page - http://www.brasileiro.net/roberto