On 6 April 2018 at 20:38, Ernst-Georg Schmid
<ernst-georg.schmid@bayer.com> wrote:
> I can get the resultRelation and it is 1 (which matches the Documentation that says that it would be 0 for a SELECT
butI exclude SELECTs as you suggested).
I didn't quite say exclude SELECT :)
I wrote:
> You'll probably also want to check the query->commandType to ensure
> the command is one that will actually have a valid resultRelation.
> if(parse->commandType != CMD_SELECT) {
Does it perhaps crash on a utility command?
Have a look at parsenodes.h and find the comments for resultRelation,
then find the commandType field and look for the definition of
CmdType. You'll see you need to think a bit harder about which
commandTypes you allow.
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services