From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian) |
Cc: | scrappy(at)hub(dot)org, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] reverse file descriptor to a file name... |
Date: | 1998-04-10 22:57:47 |
Message-ID: | 199804102257.SAA06124@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> You can't get a file name from a descriptor, because there can be more
> than one. The system just returns information about the inode, not
> about the directory entries pointing to the inode.
>
> For your purpose, you want:
>
> Relation->rd_rel->relname
>
> Works like champ.
>
> This is not a trivial question, because the structures in PostgreSQL are
> very complicated until you get used to them.
Speaking of this, I always considered this comment in
optimizer/plan/planner.c to be a classic:
/* reach right in there, why don't you? */
if (tletype != reln->rd_att->attrs[i - 1]->atttypid)
elog(ERROR, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
From | Date | Subject | |
---|---|---|---|
Next Message | Ryan Kirkpatrick | 1998-04-10 23:04:59 | Linux/Alpha and pgsql.... |
Previous Message | Boersenspielteam | 1998-04-10 22:30:53 | Re: [HACKERS] subselect and optimizer |