pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedimmutable function calling stable function
3+ messages / 3 participants
[nested] [flat]
* immutable function calling stable function
@ 2004-07-21 14:04 Markus Bertheau <twanger@bluetwanger.de>
2004-07-21 14:45 ` Re: immutable function calling stable function Tom Lane <tgl@sss.pgh.pa.us>
2004-07-21 14:51 ` Re: immutable function calling stable function Stephan Szabo <sszabo@megazone.bigpanda.com>
0 siblings, 2 replies; 3+ messages in thread
From: Markus Bertheau @ 2004-07-21 14:04 UTC (permalink / raw)
To: pgsql-sql
Hi,
shouldn't it be illegal for an immutable function to call a stable one?
--
Markus Bertheau <twanger@bluetwanger.de>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: immutable function calling stable function
2004-07-21 14:04 immutable function calling stable function Markus Bertheau <twanger@bluetwanger.de>
@ 2004-07-21 14:45 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2004-07-21 14:45 UTC (permalink / raw)
To: Markus Bertheau <twanger@bluetwanger.de>; +Cc: pgsql-sql
Markus Bertheau <twanger@bluetwanger.de> writes:
> shouldn't it be illegal for an immutable function to call a stable one?
No, because that's the standard hack for getting around it when you wish
to call a stable function in what you know to be a "safe" way. If you
look in the archives you'll find cases where creating an immutable
wrapper function was the recommended solution to performance problems.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: immutable function calling stable function
2004-07-21 14:04 immutable function calling stable function Markus Bertheau <twanger@bluetwanger.de>
@ 2004-07-21 14:51 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
1 sibling, 0 replies; 3+ messages in thread
From: Stephan Szabo @ 2004-07-21 14:51 UTC (permalink / raw)
To: Markus Bertheau <twanger@bluetwanger.de>; +Cc: pgsql-sql
On Wed, 21 Jul 2004, Markus Bertheau wrote:
> shouldn't it be illegal for an immutable function to call a stable one?
It's expected that the function's creator is responsible for properly
marking its stability. This allows some flexibility when you know more
than the system does (for example, a stable function that isn't immutable
because of its use of a GUC variable being called from a function that
sets said variable).
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-07-21 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-07-21 14:04 immutable function calling stable function Markus Bertheau <twanger@bluetwanger.de>
2004-07-21 14:45 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-07-21 14:51 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox