Re: Getting table name/tuple from OID

From: Paresh Bafna <paresh(at)it(dot)iitb(dot)ac(dot)in>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Getting table name/tuple from OID
Date: 2005-11-07 16:17:52
Message-ID: 436F7E30.7090706@it.iitb.ac.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Actually I want to do this from inside the postgres code i.e. I want to
get table name and tuple values from OID of corresponding table OID and
tuple OID.
Is there any built in function in postgres code to do this?

Paresh

Christopher Kings-Lynne wrote:

> Try
>
> SELECT 12341234::regclass;
>
> Where 12341234 is the OID of a table.
>
> Otherwise try:
>
> SELECT tableoid, * FROM table;
>
> To get the tableoid on each row.
>
> Chris
>
> Paresh Bafna wrote:
>
>> Is there any way to retrieve table name and/or tuple values from OID of
>> table/tuple?
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: don't forget to increase your free space map settings
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-07 16:19:20 Re: Another pgindent gripe
Previous Message Kevin Grittner 2005-11-07 16:11:09 Re: Another pgindent gripe