Re: [HACKERS] DB2's row_number()

2003-07-17 Thread Tom Lane
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <[EMAIL PROTECTED]> writes: > question is: How do I find out when a query starts? Inside a table > function I can call SRF_IS_FIRSTCALL() to see when it is called first. > Is there an easy way to check that inside an "ordinary" C function > returning just

Re: [HACKERS] DB2's row_number()

2003-07-17 Thread Darcy Buskermolen
Here is how I doi it when I need to... BEGIN; CREATE TEMP SEQUENCE row_num; SELECT next_val('row_num'), relname FROM pg_class LIMIT 3; ROLLBACK; You could also do this with a Set Returning Fucntion so that it returns the nextval in a simular way On Thursday 17 July 2003 08:03, Hans-Jürgen Sch