Search Postgresql Archives

Triggers question

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

 



Hi All!
I want to setup a trigger capable to return more than one record.

Example (table users contains 10 records):

CREATE FUNCTION get_users() RETURNS
SOME_TYPE AS '
BEGIN
       return (SELECT * FROM users);
' LANGUAGE 'plpgsql';

I can't figure out the correct Postgres type for SOME_TYPE (see above example).

How can I write such trigger?
I mean, what is the correct prototype of this trigger function?

Thanks in advance
/ycrux







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux