Re: [BUGS] Bug in SQL functions that use a NULL parameter directly

2001-01-14 Thread Stephan Szabo
On Sun, 14 Jan 2001, Michael Richards wrote: > I do not understand how this can possibly be correct unless NULL is > not permitted in a function. > > In one case, I've got: > WHERE value= $1 > Which is called with NULL and therefore should be: > WHERE value= NULL > This fails. Right, but value

Re: [BUGS] Bug in SQL functions that use a NULL parameter directly

2001-01-14 Thread Michael Richards
I do not understand how this can possibly be correct unless NULL is not permitted in a function. In one case, I've got: WHERE value= $1 Which is called with NULL and therefore should be: WHERE value= NULL This fails. The other case which is logically equivalent I've got: WHERE value= $1 OR ($1=

Re: [BUGS] Bug in SQL functions that use a NULL parameter directly

2001-01-14 Thread Stephan Szabo
On Sun, 14 Jan 2001, Michael Richards wrote: > Hi. > > I'm using 7.0.3 and I've found a bug: > > create table test(value int4); > create function testfunc(int4) > RETURNS bool AS > 'SELECT count(*)>0 AS RESULT FROM test where value= $1' > language 'SQL'; > > So I want this

[BUGS] Bug in SQL functions that use a NULL parameter directly

2001-01-13 Thread Michael Richards
Hi. I'm using 7.0.3 and I've found a bug: create table test(value int4); create function testfunc(int4) RETURNS bool AS 'SELECT count(*)>0 AS RESULT FROM test where value= $1' language 'SQL'; So I want this function to return true when it finds the specified value in the t