Re: [HACKERS] RelFileNode to Relation

2013-10-19 Thread Soroosh Sardari
On Sat, Oct 19, 2013 at 11:53 AM, Tom Lane wrote: > Soroosh Sardari writes: > > I need to get a Relation instance but I have only a RelFileNode! > > Why do you think you need to do that? Such a lookup is inherently the > wrong thing, because relations' relfilenode values are not fixed (unless >

Re: [HACKERS] RelFileNode to Relation

2013-10-19 Thread Tom Lane
Soroosh Sardari writes: > I need to get a Relation instance but I have only a RelFileNode! Why do you think you need to do that? Such a lookup is inherently the wrong thing, because relations' relfilenode values are not fixed (unless you have a lock on the relation, which presumably you don't).

[HACKERS] RelFileNode to Relation

2013-10-19 Thread Soroosh Sardari
Hi I need to get a Relation instance but I have only a RelFileNode! I see the relcache.h, only the following function seems helpful extern Relation RelationIdGetRelation(Oid relationId); However, there is another problem, In the RelFileNode, only relNode exist and as comment said this is equival

Re: [HACKERS] relfilenode

2005-10-27 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > The docs have this description for pg_class::relfilenode: "Name of the > on-disk file of this relation; 0 if none". However, Elein just pointed > out to me that there are no entries with 0, so this description seems > incorrect. What should we say? It

Re: [HACKERS] relfilenode

2005-10-27 Thread Michael Fuhr
On Thu, Oct 27, 2005 at 09:12:15PM -0400, Andrew Dunstan wrote: > The docs have this description for pg_class::relfilenode: "Name of the > on-disk file of this relation; 0 if none". However, Elein just pointed > out to me that there are no entries with 0, so this description seems > incorrect. W

Re: [HACKERS] relfilenode

2005-10-27 Thread elein
On Thu, Oct 27, 2005 at 09:12:15PM -0400, Andrew Dunstan wrote: > > The docs have this description for pg_class::relfilenode: "Name of the > on-disk file of this relation; 0 if none". However, Elein just pointed > out to me that there are no entries with 0, so this description seems > incorrect

[HACKERS] relfilenode

2005-10-27 Thread Andrew Dunstan
The docs have this description for pg_class::relfilenode: "Name of the on-disk file of this relation; 0 if none". However, Elein just pointed out to me that there are no entries with 0, so this description seems incorrect. What should we say? It appears that in at least some of these cases th