Skip site navigation (1) Skip section navigation (2)

String function page incorrect?

From: "Jonathan Ellis" <jellis(at)advocast(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: String function page incorrect?
Date: 2000-11-30 19:40:01
Message-ID: 017c01c05b05$5729dfa0$0d00a8c0@dsl.inconnect.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-sql
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 ","

bf2=# select textpos('high', 'ig');
ERROR:  Function 'textpos(unknown, unknown)' does not exist
 Unable to identify a function that satisfies the given argument types
 You may need to add explicit typecasts

bf2=# select textpos(text('high'), text('ig'));
ERROR:  Function 'textpos(text, text)' does not exist
 Unable to identify a function that satisfies the given argument types
 You may need to add explicit typecasts

???

-Jonathan


In response to

Responses

pgsql-sql by date

Next:From: Brian PowellDate: 2000-11-30 19:47:43
Subject: I get an error with Foreign Keys
Previous:From: Francis SolomonDate: 2000-11-30 19:39:01
Subject: RE: Can PostGreSQL handle 100 user database?

pgsql-general by date

Next:From: Alain ToussaintDate: 2000-11-30 20:05:16
Subject: Re: Database cluster?
Previous:From: Francis SolomonDate: 2000-11-30 19:39:01
Subject: RE: Can PostGreSQL handle 100 user database?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group