Re: need help to write a function in postgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.)

--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux