Re: Subtle pg_dump problem...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Subtle pg_dump problem...
Date: 2004-05-14 02:11:35
Message-ID: 15792.1084500695@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>>> That would be great if a C function could find out what schema it had
>>> been declared in, but I don't think it can readily do so.
>>
>> TODO candidate ?

> Seems like it would be a good thing.

I take that back: you can find it out if you really want to. You can
get your own function OID from the fcinfo->flinfo struct, look that up
in pg_proc, and get the pronamespace field. If you want the schema
name, and not just its OID, that'll cost you a second cache lookup.
Not too many lines of code, though it might be wise to fix things so you
need not repeat this each time through the function.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2004-05-14 05:17:30 Re: PITR Dead horse?
Previous Message Tom Lane 2004-05-14 02:03:21 Re: Bogus permissions display in 7.4