position('' in '') returns 1 instead of 0
От | pgsql-bugs@postgresql.org |
---|---|
Тема | position('' in '') returns 1 instead of 0 |
Дата | |
Msg-id | 200104182025.f3IKPXD86278@hub.org обсуждение исходный текст |
Ответы |
Re: position('' in '') returns 1 instead of 0
Re: position('' in '') returns 1 instead of 0 |
Список | pgsql-bugs |
Terry Carlin (terry@greatbridge.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 Long Description 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. When I looked at what was being sent over to postgresql, it boiled downto a position('' in '') Entering the command select position(''' in '') into psql gives a 1 also. if you also do select position('' in 'abc') it also returns 1. This returns a 1. Since the length('') returns 0, it seems to me that position('' in '') should return either a zero orNULL as there is no position 1 in the string ''. Sample Code select position('' in ''); select length(''); select position('' in 'abc'); No file was uploaded with this report
В списке pgsql-bugs по дате отправления: