From: | huaxin zhang <uwcssa(at)gmail(dot)com> |
---|---|
To: | Paresh Bafna <paresh(at)it(dot)iitb(dot)ac(dot)in> |
Cc: | 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-11 13:37:07 |
Message-ID: | f2f562510511110537h68184a12y98caad9d12b17393@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
I am interested in the answer as well -- how to get a table name (or
an operator name)
from an OID. the parser must know how to do this, but the segment
of code is hard
to locate.
thanks a lot,
Huaxin
On 11/7/05, Paresh Bafna <paresh(at)it(dot)iitb(dot)ac(dot)in> wrote:
> 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
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
From | Date | Subject | |
---|---|---|---|
Next Message | Harald Fuchs | 2005-11-11 13:43:23 | 8.1 substring bug? |
Previous Message | Peter Eisentraut | 2005-11-11 12:18:31 | Re: lc_numeric and decimal delimiter |