[SQL] database abstraction -> functions
Hi, When developing applications is a good thing to create abstraction between different layers The one concerning the database would be the persistence layer. To create such abstraction I want all mij datababase activitie runned through functions. But how can I return a set of rows instead of a single datatype (I looked into the setof but never found a clear simple)? kind regards Jeroen Olthof ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
[SQL] function return multiply rows
What is going wrong here? An example of what I'm trying to do. vw_teams is a view but same problem when trying it on a single table CREATE FUNCTION test() RETURNS SETOF vw_teams AS 'select * from vw_teams;' LANGUAGE 'sql'; SELECT test(); results in test --- 137789256 137789256 (2 rows) and this is what I expect team | datum --+ groenwit | 2002-07-09 ordenbos | 2002-09-14 (2 rows) ???? kind regard Jeroen Olthof ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly