On Dec 8, 2008, at 5:15 PM, Merlin Moncure wrote:

Hello,

I've been bit by this about a million times:

select (func()).* executes the function once per each field in the
returned tuple.  See the example below:


I ran into this exact problem a week or two ago.

I didn't dig too far into it but I figured (func()).* was being expanded by the parser into func().a, func().b and friends. marking it stable didn't help.

It can be quite surprising, especially if func() is expensive (as was my case) or has side effects.

--
Jeff Trout <[EMAIL PROTECTED]>
http://www.stuarthamm.net/
http://www.dellsmartexitin.com/




--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to