Re: DB2's row_number()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DB2's row_number()
Date: 2003-07-17 18:30:50
Message-ID: 5771.1058466650@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres(at)cybertec(dot)at> 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 one value?

Use fn_extra to store some state data.
pg_stat_get_backend_idset() is a useful example.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-07-17 20:13:57 pgsql-server/src/backend/commands comment.c
Previous Message Larry Rosenman 2003-07-17 18:26:20 Re: Patches List