Re: tracking owner of extension-managed objects - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: tracking owner of extension-managed objects
Date
Msg-id 567AFDD0.9090607@BlueTreble.com
Whole thread Raw
In response to Re: tracking owner of extension-managed objects  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: tracking owner of extension-managed objects
List pgsql-hackers
On 12/23/15 12:26 PM, Robert Haas wrote:
>> What's the lightest-weight object I can create that has an owner,
>> >and whose disappearance I can be notified of?
> Schema?

I was thinking view or function, since then you can hide all of them in 
an internal-only schema.

BTW, I've been pondering a very similar problem to this. I'm working on 
a metacoding framework, and it's inevitable that at some point it will 
want to know what objects it's created. I can use reg* for a lot of 
that, but that still doesn't let me do a foreign key. And not all 
objects have reg* casts last I looked.

I was planning on just making a best possible attempt and solving this 
in an extension via a combination of event triggers, reg* and other 
voodoo, but being able to insert things directly into pg_(sh)depend or 
equivalent tables would be a lot more robust.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Experimental evaluation of PostgreSQL's query optimizer
Next
From: Jim Nasby
Date:
Subject: Re: [POC] FETCH limited by bytes.