From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Robert Haas <robertmhaas@gmail.com>
To: Chapman Flack <chap@anastigmatix.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: tracking owner of extension-managed objects
Date: Wed, 23 Dec 2015 14:02:24 -0600
Message-ID: <567AFDD0.9090607@BlueTreble.com> (raw)
In-Reply-To: <CA+TgmobBFoWaCJhiX_gXaPfXjucChJiVM8J0LRZ34eo=VvP03w@mail.gmail.com>
References: <56783412.6090005@anastigmatix.net>
<3486.1450720004@sss.pgh.pa.us>
<56785344.6080803@anastigmatix.net>
<56785C8C.6060006@anastigmatix.net>
<CA+TgmobBFoWaCJhiX_gXaPfXjucChJiVM8J0LRZ34eo=VvP03w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: Jim.Nasby@BlueTreble.com, robertmhaas@gmail.com, chap@anastigmatix.net, tgl@sss.pgh.pa.us
Subject: Re: tracking owner of extension-managed objects
In-Reply-To: <567AFDD0.9090607@BlueTreble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox