Get the name of the target Relation from Query struct? - Mailing list pgsql-hackers

From Ernst-Georg Schmid
Subject Get the name of the target Relation from Query struct?
Date
Msg-id 2f1e36ff7e7a4149822c75503d9b30f3@BYEX19.de.bayer.cnb
Whole thread Raw
Responses Re: Get the name of the target Relation from Query struct?
List pgsql-hackers
Hello,

I want to get the target Relation name for a UPDATE / INSERT / DELETE in a planner_hook. Do I understand struct Query
correctlythat: 

Query->resultRelation will be the index into Query->rtable to give me the target Relation?

And if yes, what would rtable give me as list entry? An OID or a Relation or something else?

Best regards,

Ernst-Georg



pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: Add support for printing/reading MergeAction nodes
Next
From: Magnus Hagander
Date:
Subject: Re: pgsql: Validate page level checksums in base backups