Re: function not called if part of aggregate

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: function not called if part of aggregate
Date: 2006-06-11 17:48:37
Message-ID: 20060611174837.GF34196@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, Jun 11, 2006 at 10:18:20AM -0700, Craig A. James wrote:
> This doesn't seem right to me -- how can the optimizer possibly know that a
> function doesn't have a side effect, as in my case? Functions could do all
> sorts of things, such as logging activity, filling in other tables, etc,
> etc.
>
> Am I missing something here?

Read about function stability in the docs.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Stark 2006-06-11 18:00:38 Re: function not called if part of aggregate
Previous Message Tom Lane 2006-06-11 17:39:30 Re: function not called if part of aggregate