Re: How to get RelationName ??

From: Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
To: "Ramanujam H S Iyengar" <hals_ramu(at)hotmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to get RelationName ??
Date: 2004-03-10 23:27:26
Message-ID: 200403101527.26418.jgardner@jonathangardner.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday 10 March 2004 09:58 am, Ramanujam H S Iyengar wrote:
> Hello,
>
> How can i get the name of a relation from its Oid ?? I have seen some
> functions in utils/cache/relcache.h like RelationIdGetRelation - which
> gives Relation Node from Oid RelationSysNameGetRelation - which gives
> Relation node for only the System names.
>
> Can anyone please tell me how to get Relation node from relation name ???
>

Won't you have to go get the data from the database for this? I mean
actually execute the query:

select relname from pg_class where oid = 1234;

--
Jonathan Gardner
jgardner(at)jonathangardner(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-03-10 23:44:41 Re: selective statement logging
Previous Message Thomas Swan 2004-03-10 23:18:55 Re: [GENERAL] Shouldn't B'1' = 1::bit be true?