Re: tracking owner of extension-managed objects

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tracking owner of extension-managed objects
Date: 2015-12-23 20:02:24
Message-ID: 567AFDD0.9090607@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-12-23 20:08:15 Re: [POC] FETCH limited by bytes.
Previous Message Jim Nasby 2015-12-23 19:50:06 Re: Experimental evaluation of PostgreSQL's query optimizer