7.0.2-docs: textpos -> strpos

From: "Albert REINER" <areiner(at)tph(dot)tuwien(dot)ac(dot)at>
To: PostgreSQL-SQL <pgsql-sql(at)postgreSQL(dot)org>
Subject: 7.0.2-docs: textpos -> strpos
Date: 2001-01-31 15:17:22
Message-ID: 20010131161722.A6590@frithjof
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)tph(dot)tuwien(dot)ac(dot)at>
Deutsch * English * Esperanto * Latine
--------------------------------------------------------------------------

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Volpe 2001-01-31 15:42:59 Re: Permissions for foreign keys
Previous Message Sveinung Haslestad 2001-01-31 15:14:28 Array parameter to plpgsql-functions