[GENERAL] help with function

2007-06-16 Thread Rhys Stewart
Hi all, trying to write a function to do the following: 1. select a random *unused* (see below) row from a table. 2. select 9 more rows from same table based on relation to first row selected 3. mark these 10 rows as used and assign a group 4. goto 1 5 when all rows are used, return the set of ro

[GENERAL] Help with function

2006-10-04 Thread Chris Hoover
I need some help with writing a plpgsql function.  I want to return multiple items from the function.  How do I do this?Here is my attempt at the function (note, this is a simple example that could obviously be done via a view, but I am trying to learn more about writing plpgsql functions): create