[PATCH] Allow CustomScan nodes to signal projection support - Mailing list pgsql-hackers

From Sven Klemm
Subject [PATCH] Allow CustomScan nodes to signal projection support
Date
Msg-id CAMCrgp1kyakOz6c8aKhNDJXjhQ1dEjEnp+6KNT3KxPrjNtsrDg@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Allow CustomScan nodes to signal projection support  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers
Hi,

The attached patch allows CustomScan nodes to signal whether they
support projection.
Currently all CustomScan nodes are treated as supporting projection.
But it would be nice
for custom nodes to opt out of this to prevent postgres from modifying
the targetlist of
the custom node.

For features similar to set-returning functions the function call
needs to be a top level expression in a custom node that implements it
but any targetlist adjustments
might be modified by postgres because it is not aware of the special
meaning of those function calls and it might push down a different
targetlist in the node cause it assumes
the node can project.

I named the flag CUSTOMPATH_SUPPORT_PROJECTION similar to the other
custom node flags, but this would revert the current logic and nodes
would have to opt into
projection. I thought about naming it CUSTOMPATH_CANNOT_PROJECT to keep
the current default and make it an opt out. But that would make the
flag name notably different from the other flag names. Any opinions on
the flag name and whether it should be opt in or opt out?

-- 
Regards, Sven Klemm

Attachment

pgsql-hackers by date:

Previous
From: David Steele
Date:
Subject: Re: invalid data in file backup_label problem on windows
Next
From: Dmitry Dolgov
Date:
Subject: Re: UniqueKey on Partitioned table.