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

From Ernst-Georg Schmid
Subject AW: Get the name of the target Relation from Query struct?
Date
Msg-id 276c4d1f1d8f49cd8dc15677d98504f0@BYEX19.de.bayer.cnb
Whole thread Raw
In response to Re: Get the name of the target Relation from Query struct?  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Get the name of the target Relation from Query struct?
List pgsql-hackers
Thank you David, so I am on the right track.
 
>If you want the relation name from the OID then you'll need something
>like get_rel_name().

Hm, lsyscache.c says for get_rel_name():

  * NOTE: since relation name is not unique, be wary of code that uses this
  * for anything except preparing error messages.

How do I get the schema name too, then?

Call get_rel_namespace() and then get_rel_name() again with the Oid that was returned?

Best regards,

Ernst-Georg

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Validate page level checksums in base backups
Next
From: Tom Lane
Date:
Subject: Re: typcategory for regconfig