Re: [HACKERS] Getting table name/tuple from OID

2005-11-11 Thread uwcssa
Thanks for the quick reply. I made a mistake last time by asking the question: actually, i would like to know how to get the OID from a table name or operator name.   For example, ">" is 512 while "="  is 96.   and some table has the magic relid of 20078, say. How could I find out the OID by givin

Re: [HACKERS] Getting table name/tuple from OID

2005-11-11 Thread Marek Lewczuk
huaxin zhang napisał(a): 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. CREATE OR REPLACE FUNCTION gettablename(__oid oid) RETURNS "varchar" AS $BOD

Re: [HACKERS] Getting table name/tuple from OID

2005-11-11 Thread Martijn van Oosterhout
On Fri, Nov 11, 2005 at 08:37:07AM -0500, huaxin zhang wrote: > 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. For the purposes of error messages,

Re: [HACKERS] Getting table name/tuple from OID

2005-11-11 Thread huaxin zhang
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 <[EMAIL PROTECTED]> wrote: > Actually I want to do this fr

Re: [HACKERS] Getting table name/tuple from OID

2005-11-07 Thread Paresh Bafna
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; > > Wh

Re: [HACKERS] Getting table name/tuple from OID

2005-11-07 Thread Christopher Kings-Lynne
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? ---(en

Re: [HACKERS] Getting table name/tuple from OID

2005-11-07 Thread Tino Wildenhain
Paresh Bafna schrieb: Is there any way to retrieve table name and/or tuple values from OID of table/tuple? Yes. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL

[HACKERS] Getting table name/tuple from OID

2005-11-07 Thread Paresh Bafna
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