Re: [SQL] Function does not return, but gives error..

2005-06-16 Thread M.D.G. Lange
: [SQL] Function does not return, but gives error.. I have the following function to determine wether or not a user is member of a group, however I have a small problem with it: a group without members results in groupres being NULL (I have checked this), however IF groupres = NULL THEN change

Re: [SQL] Function does not return, but gives error..

2005-06-16 Thread Michael Fuhr
On Thu, Jun 16, 2005 at 02:26:39PM +0200, M.D.G. Lange wrote: > > IF groupres = NULL > THEN > ... > END IF; > is not trapped... Be sure to understand how NULL works in comparisons: http://www.postgresql.org/docs/8.0/static/functions-comparison.html SELECT NULL = NULL; ?column? -- (1

Re: [SQL] Function does not return, but gives error..

2005-06-16 Thread M.D.G. Lange
Gnanavel Shanmugam wrote: -Original Message- From: [EMAIL PROTECTED] Sent: Thu, 16 Jun 2005 14:26:39 +0200 To: pgsql-sql@postgresql.org Subject: [SQL] Function does not return, but gives error.. I have the following function to determine wether or not a user is member of a group

Re: [SQL] Function does not return, but gives error..

2005-06-16 Thread Gnanavel Shanmugam
> -Original Message- > From: [EMAIL PROTECTED] > Sent: Thu, 16 Jun 2005 14:26:39 +0200 > To: pgsql-sql@postgresql.org > Subject: [SQL] Function does not return, but gives error.. > > I have the following function to determine wether or not a user is > member of a

[SQL] Function does not return, but gives error..

2005-06-16 Thread M.D.G. Lange
I have the following function to determine wether or not a user is member of a group, however I have a small problem with it: a group without members results in groupres being NULL (I have checked this), however IF groupres = NULL THEN ... END IF; is not trapped... I have tried to use array_uppe