From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: dealing with extension dependencies that aren't quite 'e' |
Date: | 2016-03-01 01:56:07 |
Message-ID: | 56D4F6B7.8010200@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2/29/16 7:27 PM, Abhijit Menon-Sen wrote:
> 1. This adds the 'x'/DEPENDENCY_AUTO_EXTENSION type.
> 2. This adds an 'ALTER FUNCTION … ADD DEPENDENT FUNCTION …' command.
>
> I split up the two because we may want the new dependency type without
> going to the trouble of adding a new command. Maybe extension authors
> should just insert an 'x' row into pg_depend directly?
I don't see why this would be limited to just functions. I could
certainly see an extension that creates ease-of-use views that depend on
the extension, or tables that have triggers that .... Am I missing
something?
> I was inclined to implement it using ALTER FUNCTION, but AlterFunction()
> is focused on altering the pg_proc entry for a function, so the new code
> didn't fit. Ultimately, ExecAlterExtensionContentsStmt() was the closest
> match, so that's where I did it.
Maybe the better way to handle this would be through ALTER EXTENSION?
Given the audience for this, I think it'd probably be OK to just provide
a function that does this, instead of DDL. I'd be concerned about asking
users to do raw inserts though. pg_depends isn't the easiest thing to
grok so I suspect there'd be a lot of problems with that, resulting in
more raw DML to try and fix things, resulting in pg_depend getting
completely screwed up...
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2016-03-01 02:20:13 | pg_dump dump catalog ACLs |
Previous Message | Jim Nasby | 2016-03-01 01:49:25 | Re: Improve error handling in pltcl |