Re: String function page incorrect?

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: Jonathan Ellis <jellis(at)advocast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: String function page incorrect?
Date: 2000-11-30 23:25:15
Message-ID: 3A26E1DB.2C8B34FB@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2000-11-30 23:34:33 Re: strange query plans
Previous Message Chris Jones 2000-11-30 23:20:58 inheritance and foreign keys

Browse pgsql-sql by date

  From Date Subject
Next Message musicon 2000-12-01 00:10:35 eject
Previous Message Tom Lane 2000-11-30 23:05:42 Re: String function page incorrect?