Re: [HACKERS] check_srf_call_placement() isn't always setting p_hasTargetSRFs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] check_srf_call_placement() isn't always setting p_hasTargetSRFs
Date
Msg-id 21818.1484593824@sss.pgh.pa.us
Whole thread Raw
Responses Re: [HACKERS] check_srf_call_placement() isn't always setting p_hasTargetSRFs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Is there a reason not to just set p_hasTargetSRFs once towards the end
> of the function, instead of doing so for all the non-error cases?

Yes: it's not supposed to get set when the SRF is in FROM.

> I wonder if there should be a seperate expression type for
> the INSERT ... VALUES(exactly-one-row); since that behaves quite
> differently.

Perhaps.  Or maybe we should just use EXPR_KIND_SELECT_TARGET for that?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (wasChanged SRF in targetlist handling)
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)