Re: [HACKERS] tracking owner of extension-managed objects

2015-12-31 Thread Chapman Flack
On 12/31/15 19:06, Jim Nasby wrote: > Those columns are there to tell you what *kind* of objects are involved in > the dependency. For example, a function will have two entries. classid will > be 1255 (pg_proc) for both of them. refclassid will be 2612 (pg_language) > for one and 2615 (pg_namespace

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-31 Thread Jim Nasby
On 12/31/15 3:49 PM, Chapman Flack wrote: On 12/23/15 15:02, Jim Nasby wrote: >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 was planning on just mak

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-31 Thread Chapman Flack
On 12/23/15 15:02, Jim Nasby wrote: > 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 was planning on just making a best possible attempt and solving

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-23 Thread Jim Nasby
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

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-23 Thread Robert Haas
On Mon, Dec 21, 2015 at 3:09 PM, Chapman Flack wrote: > On 12/21/2015 02:30 PM, Chapman Flack wrote: >> On 12/21/2015 12:46 PM, Tom Lane wrote: > >>> all, since we don't provide a way for extensions to hook into the DROP >>> mechanisms. Perhaps that should be fixed.) >> >> That is literally *the

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-21 Thread Chapman Flack
On 12/21/2015 02:30 PM, Chapman Flack wrote: > On 12/21/2015 12:46 PM, Tom Lane wrote: >> all, since we don't provide a way for extensions to hook into the DROP >> mechanisms. Perhaps that should be fixed.) > > That is literally *the very next* e-mail I was going to compose. > > I was looking a

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-21 Thread Chapman Flack
On 12/21/2015 12:46 PM, Tom Lane wrote: > BTW, any such ownership relationship really needs to be reflected into > pg_shdepend, else someone might drop a role that still owns objects. > (I guess there are problems with extensions trying to do such things at > all, since we don't provide a way for

Re: [HACKERS] tracking owner of extension-managed objects

2015-12-21 Thread Tom Lane
Chapman Flack writes: > PL/Java is an extension that manages some objects (jar files, which > users can tell PL/Java to load, drop, or replace). The objects have > owners (have had since PL/Java 1.1.0 anyway). > When the owner tracking was added for 1.1.0 it recorded the owner oid. > In 2006, be

[HACKERS] tracking owner of extension-managed objects

2015-12-21 Thread Chapman Flack
I'm looking for best-practice advice. PL/Java is an extension that manages some objects (jar files, which users can tell PL/Java to load, drop, or replace). The objects have owners (have had since PL/Java 1.1.0 anyway). When the owner tracking was added for 1.1.0 it recorded the owner oid. In 20