pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
7.0.2-docs: textpos -> strpos
2+ messages / 2 participants
[nested] [flat]

* 7.0.2-docs: textpos -> strpos
@ 2001-01-31 15:17  Albert REINER <areiner@tph.tuwien.ac.at>
  0 siblings, 1 reply; 2+ messages in thread

From: Albert REINER @ 2001-01-31 15:17 UTC (permalink / raw)
  To: 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@tph.tuwien.ac.at>
Deutsch       *       English       *       Esperanto       *       Latine
--------------------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: 7.0.2-docs: textpos -> strpos
@ 2001-02-02 15:18  Peter Eisentraut <peter_e@gmx.net>
  parent: Albert REINER <areiner@tph.tuwien.ac.at>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2001-02-02 15:18 UTC (permalink / raw)
  To: Albert REINER <areiner@tph.tuwien.ac.at>; +Cc: pgsql-sql

Albert REINER writes:

> in the 7.0.2-docs I find the function textpos:

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

textpos() was removed from the 7.1 documentation.  position() is the SQL
function, I think strpos() is from Oracle.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-02-02 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-31 15:17 7.0.2-docs: textpos -> strpos Albert REINER <areiner@tph.tuwien.ac.at>
2001-02-02 15:18 ` Peter Eisentraut <peter_e@gmx.net>

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