Re: Subtle pg_dump problem... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Subtle pg_dump problem...
Date
Msg-id 15792.1084500695@sss.pgh.pa.us
Whole thread Raw
In response to Subtle pg_dump problem...  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Relocatable installs
Next
From: Chris Browne
Date:
Subject: AIX Compilation Fun with 7.5 CVS