Tom,

> I don't believe that extension SQL scripts should rely on DO blocks.
> There is no requirement that plpgsql be installed, and we're not going
> to create one as part of this feature.  What this means is that the
> design you offer above doesn't work at all, since it fundamentally
> assumes that the SQL script can do conditional logic.  What's more,
> it fundamentally assumes that the script WILL do conditional logic
> and support (in one lump) every possible combination of versions.
> That's going to turn into buggy spaghetti-code very quickly.

I just noticed this response, and don't think it can stand as-is.

While I agree that it's not reasonable to have a single script which
supports every combination of versions, I also assert that it's
completely unreasonable to expect extension authors to write upgrade
scripts with no conditional logic.  Your view would essentially be
requiring authors to write a completely seperate SQL script for every
single possible combination of two versions.

For an extension which has had 10 releases with SQL modifications, this
would be 45 separate upgrade files.  That's a ridiculous thing to expect
of any contributor.

I, for one, have no problem whatsoever with requiring that users have
plpgsql installed in order to use extensions. It's installed by default.
If they need to uninstall plpgsql for some security reason, then fine;
they can write their own upgrade scripts.  You are pushing making things
easy for 0.5% of our users at the expense of everyone else.

-- 
                                  -- Josh Berkus
                                     PostgreSQL Experts Inc.
                                     http://www.pgexperts.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 via email to