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

My second PL/pgSQL function - minor problem

From: Thomas Løcke <thomas(dot)granvej6(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: My second PL/pgSQL function - minor problem
Date: 2009-11-18 15:52:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hey all,

The above function appears to be doing exactly what I want: Fetch the users
data and update the visits column, if the supplied credentials match a user.

My problem is what happens when the credentials don't match a user. In those
cases I would like to have a boolean false returned, but instead I get an
empty array - which of course is entirely according to the functions "RETURN
SETOF users" statement.

Is this little problem solvable, or will I have to learn to live with the
empty array?



pgsql-novice by date

Next:From: A. KretschmerDate: 2009-11-18 16:18:48
Subject: Re: My second PL/pgSQL function - minor problem
Previous:From: Tom LaneDate: 2009-11-17 23:54:05
Subject: Re: 8.38 -> 8.5?

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