pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Albert REINER <areiner@tph.tuwien.ac.at>
To: PostgreSQL-SQL <pgsql-sql@postgreSQL.org>
Subject: 7.0.2-docs: textpos -> strpos
Date: Wed, 31 Jan 2001 16:17:22 +0100
Message-ID: <20010131161722.A6590@frithjof> (raw)

Saluton,

in the 7.0.2-docs I find the function textpos:

,----
|    Table 5-5. String Functions
|   ...
|    textpos(text,text)      text      locate      specified      substring
|    position('high','ig')
`----

However, in psql it seems one has to use strpos:

,----
| litdb=> select textpos('a  b', '  ');
| 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
| litdb=> select strpos('a  b', '  ');
|  strpos
| --------
| 	2
| (1 row)
| 
| litdb=> select version();
| 				version
| --------------------------------------------------------------------
|  PostgreSQL 7.0.2 on i586-pc-linux-gnulibc1, compiled by gcc 2.95.1
| (1 row)
`----

textpos does not seem to exist:

,----
| litdb=> \df .*pos
| 		   List of functions
|  Result |    Function     |       Arguments
| --------+-----------------+------------------------
|  int4   | position        | text text
|  float8 | positionjoinsel | oid oid int2 oid int2
|  float8 | positionsel     | oid oid int2 - int4
|  int4   | strpos          | text text
| (4 rows)
`----

Maybe this should be fixed in the docs.

Albert.


-- 

--------------------------------------------------------------------------
Albert Reiner                                   <areiner@tph.tuwien.ac.at>
Deutsch       *       English       *       Esperanto       *       Latine
--------------------------------------------------------------------------



view thread (2+ messages)  latest in thread

Message-ID: <20010131161722.A6590@frithjof>
Permalink:  ../20010131161722.A6590@frithjof/
Also on:    postgresql.org/message-id/20010131161722.A6590@frithjof

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: areiner@tph.tuwien.ac.at
  Subject: Re: 7.0.2-docs: textpos -> strpos
  In-Reply-To: <20010131161722.A6590@frithjof>
  References: <20010131161722.A6590@frithjof>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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