[postgis-devel] EXTENSION upgrade scripts are now symlinks
lr at pcorp.us
Fri Oct 6 13:35:45 PDT 2017
Next supports going back. That's how I force the script to rerun.
CREATE EXTENSION postgis VERSION "2.5.0";
ALTER EXTENSION postgis UPDATE "2.5.0next";
ALTER EXTENSION postgis UPDATE "2.5.0";
As Steve said, let's not muck with the pg_catalog system. It's more useful to try to improve on the extension system than try to go thru the back door.
I'm sure other extension developers are similarly frustrated with the plethora of scripts. So it would be more useful to implement an idea of
What I'll call "Virtual Scripts" which would essentially be a separate file with regex or something that define
postgis-2.**--postgis-2.5.0.sql -> postgis-ANY—2.5.0.sql
That would give us the freedom of defining extra scripts for special versions or just have single as we do now.
I don't think you can have a 'next' as is because you still have to have a mechanism of defining all the migration paths.
And you can't really use something like a function SELECT postgis_upgrade() if it has to interact with the file system to pull in a script file.
From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Paul Ramsey
Sent: Friday, October 06, 2017 8:55 AM
To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
Subject: Re: [postgis-devel] EXTENSION upgrade scripts are now symlinks
Once you're at 'next' there's nowhere to go. You end up with having to upgrade from 'next' to 'next2' and so on :)
Anyways, agreed, I think we've long outgrown the extension version update mechanism, but I'm unsure of what the correct thing to recommend to pgsql team would be.
On Fri, Oct 6, 2017 at 3:16 AM, Sandro Santilli <strk at kbt.io <mailto:strk at kbt.io> > wrote:
On Fri, Oct 06, 2017 at 04:55:58AM -0400, Regina Obe wrote:
> Disregard my last question. I forgot we changed a while ago after we dropped support for PostgreSQL 9.0 to just use DO to handle the differences in versions and just have single upgrade script
Exactly, PostGIS makes it easier to upgrade !
The problem is only PostgreSQL which tries to make it harder..
I actually wonder if we could have a single --next script
so you could always do:
ALTER EXTENSION postgis UPDATE to 'next';
And then the script would re-set pg_extension version
to drop the "next" and keep the "final".
I know, very cowboysh, but I'm really sick of all those files,
even if they're now symlinks...
postgis-devel mailing list
postgis-devel at lists.osgeo.org <mailto:postgis-devel at lists.osgeo.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-devel