From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Roger Leigh <rleigh(at)codelibre(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: The scope of extensions |
Date: | 2012-04-16 15:22:19 |
Message-ID: | CAHyXU0w30u4afJEPt6MkPTkv_-=z7UrMmt6b=sHhxS+S7H5eEw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Apr 16, 2012 at 10:05 AM, Roger Leigh <rleigh(at)codelibre(dot)net> wrote:
> Hi folks,
>
> I'm a happy creator/user of extensions (e.g. my postgresql_debversion
> extension). But I'm wondering if they can be used for more than just
> simple types:
>
> - can an extension depend upon another extension? This would probably
> be implicit based upon the use of an object which belonged to another
> extension? (Are the META.json dependency metadata actually used at
> runtime?)
yes, and they already do. for example earthdistance depends on cube.
> - can relations just as tables, indexes, views and associated stuff
> such as triggers be included as part of an extension? Are there
> limits upon what may be part of an extension?
sure. generally anything you can install with SQL can be included
(and that includes SQL wrapped C functions). there are of course
pretty high requirements of code quality, documentation and usability
if you want your extension to be packaged with the core system but
otherwise just take it where you want to go.
> The reason for the above is that I'd very much like to be able to
> version my entire application's schema using the extension mechanism
> (or something based upon the ideas in the extensions mechanism). Since
> SCHEMA is already taken, maybe CREATE/ALTER/DROP_APPLICATION. This
> would permit easy installation and upgrade of all the objects relating
> to a single application installed in the database.
not following that -- it sounds like you are trying to hook into the
grammar? that's something you can't do through an extension. but it's
an interesting thought to do application versioning through the
extension system...i'm pretty sure it hasn't been tried. there may be
some pitfalls though.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2012-04-16 15:42:52 | Re: Result sets from functions |
Previous Message | Roger Leigh | 2012-04-16 15:05:58 | The scope of extensions |