My second PL/pgSQL function - minor problem

Поиск
Список
Период
Сортировка
От Thomas Løcke
Тема My second PL/pgSQL function - minor problem
Дата
Msg-id 1f0fa7ae0911180752m27776744n4760c3698781fdab@mail.gmail.com
обсуждение исходный текст
Ответы Re: My second PL/pgSQL function - minor problem  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-novice
Hey all,

http://pastebin.com/f1015226d

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?

Regards,
Thomas

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.38 -> 8.5?
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: My second PL/pgSQL function - minor problem