Re: need help to write a function in postgresql

From: Laszlo Nagy <gandalf(at)shopzeus(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: need help to write a function in postgresql
Date: 2012-08-03 08:37:11
Message-ID: 501B8DB7.5050700@shopzeus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


> Then you can do:
> select *
> from retrieve_user('foo', 'bar');
>
> Personally I'd prefer to create view that wraps that select statement
> and then simply do a
>
> select *
> from user_view
> where name = 'foo'
> and password = 'bar'
It is also better because with a view, you can also do " name is null ".
But you cannot do that with a function (unless you write unnecessary
circumstancial code.)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Craig Ringer 2012-08-03 08:48:30 Re: need help to write a function in postgresql
Previous Message Laszlo Nagy 2012-08-03 08:31:43 Messed up time zones