[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

[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

[GENERAL] HELP - Recover function delete

2005-09-19 Thread Pierre Racine
Hi, I just hit twice the delete button on a function I spent two days writing (without backing it up. I know... I know...). Is there a way to recover it? A simple garbage would do the job. I don't know many software now that do not implement a sort of simple mecanism to recover what we threw

Re: [GENERAL] HELP - Recover function delete

2005-09-19 Thread Bruce Momjian
8.1 will have a define called MAKE_EXPIRED_TUPLES_VISIBLE so you can recompile and see deleted rows. However, it isn't in 8.0 so you would have to download a current snapshot, find that define, add it to your release, compile, and use it.