Re: Determine a function's volatility in C

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bborie Park <bkpark(at)ucdavis(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Determine a function's volatility in C
Date: 2011-11-12 05:36:16
Message-ID: 19257.1321076176@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bborie Park <bkpark(at)ucdavis(dot)edu> writes:
> I'm wondering if there is a way to determine a function's volatility
> in C. The function information provided through fmgr_info() doesn't
> provide it. Ideas?

extern char func_volatile(Oid funcid)

(Most catalog-lookup convenience functions of this ilk can be found in
lsyscache.c, and that's also a good source of prototypes if you need a
field that's not exposed by one of those functions.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Cody Caughlan 2011-11-12 07:04:24 Large values for duration of COMMITs and slow queries. Due to large WAL config values?
Previous Message Pavel Stehule 2011-11-12 05:24:57 Re: Determine a function's volatility in C