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

Re: position('' in '') returns 1 instead of 0

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, terry(at)greatbridge(dot)com
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: position('' in '') returns 1 instead of 0
Date: 2001-04-19 13:20:43
Message-ID: 3ADEE62B.3D5BED97@alumni.caltech.edu (view raw or flat)
Thread:
Lists: pgsql-bugs
> Hmm where is locate() changed to position() ?
> ISTM neither psqlodbc driver nor pg backend changes the
> function call locate() to position(.. in ..).

There is a mapping table in the driver of ODBC function calls to
PostgreSQL function calls. In this case, locate() is transformed into
strpos(), which is probably the underlying function implementing
position() also.

Terry, any word on locate() vs position() specs?

                         - Thomas

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-04-19 15:08:38
Subject: Re: BUG??, fault in POSTMASTER when using GMAKE
Previous:From: Hiroshi InoueDate: 2001-04-19 04:31:16
Subject: Re: Re: position('' in '') returns 1 instead of 0

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