Re: Not understanding this behavior of a subselect + volatile function

From: Brian Palmer <brian(at)codekitchen(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Not understanding this behavior of a subselect + volatile function
Date: 2012-05-27 02:02:07
Message-ID: 269E9100-26E6-44C7-8325-0CAF481EF3E8@codekitchen.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On May 26, 2012, at 7:45 PM, Chris Angelico wrote:

> I'd be inclined to treat it like C and avoid referencing and
> altering a variable in one expression (eg arr[i++]=i; is a bad idea).

I agree, we're already working on changing it to a two-step process where we select f1(), and then select * where a = $a . I'm still really curious about what's going on here though. Thanks for the insight!

-- Brian

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-05-27 02:08:01 Re: Not understanding this behavior of a subselect + volatile function
Previous Message Chris Angelico 2012-05-27 01:45:59 Re: Not understanding this behavior of a subselect + volatile function