Received: from frithjof.reiner (c79.dialin.tuwien.ac.at [192.35.243.89]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0VH4cq53897 for ; Wed, 31 Jan 2001 12:04:38 -0500 (EST) (envelope-from areiner@tph.tuwien.ac.at) Received: (qmail 6600 invoked by uid 500); 31 Jan 2001 15:17:22 -0000 From: "Albert REINER" Date: Wed, 31 Jan 2001 16:17:22 +0100 To: PostgreSQL-SQL Subject: 7.0.2-docs: textpos -> strpos Message-ID: <20010131161722.A6590@frithjof> Mail-Followup-To: PostgreSQL-SQL Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Archive-Number: 200101/484 X-Sequence-Number: 1160 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 Deutsch * English * Esperanto * Latine --------------------------------------------------------------------------