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

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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: <terry(at)greatbridge(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: position('' in '') returns 1 instead of 0
Date: 2001-04-18 21:56:57
Message-ID: Pine.LNX.4.30.0104182352020.762-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-bugs
> Terry Carlin (terry(at)greatbridge(dot)com) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> position('' in '') returns 1 instead of 0

This is in compliance with the SQL standard.  (SQL 1999, clause 6.17,
general rule 2 a), if you care.)

> While running an ODBC test suite against PostgreSQL 7.1, the test
> software reported that the ODBC command locate("", "") failed. It
> expected the result to be zero and it got a 1.

Maybe the locate() function should be implemented differently than
position().

-- 
Peter Eisentraut   peter_e(at)gmx(dot)net   http://funkturm.homeip.net/~peter


In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-04-18 22:11:54
Subject: Re: position('' in '') returns 1 instead of 0
Previous:From: Tom LaneDate: 2001-04-18 21:26:29
Subject: Re: position('' in '') returns 1 instead of 0

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