[postgis-users] Postgis upgrade
Ivan Mincik
ivan.mincik at gmail.com
Thu May 21 07:02:12 PDT 2009
2009/5/21 Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>:
> Mateusz Naskręt -GEOPOZ- wrote:
>
> Hi Mateusz,
>
>> But in log from upgrade ("Hard upgrade" from online documentation) i can
>> see few errors. Can anyone look to it and tell me if there can be problems
>> in feature ? Or maybe i can forget about it and eveyting will be fine ?
>>
>> ERROR: language "plpgsql" allready exist
>
> This one is not a problem.
>
>> CREATE FUNCTION asgml(geometry, integer, integer) RETURNS text
>> AS '$libdir/liblwgeom.so.1.2', 'LWGEOM_asGML'
>> LANGUAGE c IMMUTABLE STRICT;
>> ERROR: could not access file "$libdir/liblwgeom.so.1.2": No such file
>> or directory
>
> This still seems to have the old version number on it.
>
>> ALTER FUNCTION public.asgml(geometry, integer, integer) OWNER TO
>> postgres;
>> ERROR: function public.asgml(geometry, integer, integer) doesn't exist
>>
>> And similar for functions:
>> public.asukml(geometry, integer, integer)
>> public.asukml(geometry, integer)
>> public.asukml(geometry)
>
> In later versions of PostGIS, several of the ST_As*ML() functions were
> changed to include SQL wrappers to provide compatible defaults. You'll need
> to grab the new relevant definitions from the 1.3.5 lwpostgis.sql and
> manually enter them by hand.
>
>> public.st_pointn(geometry)
>
> Not sure about this one - wrong version number again?
>
>> ERROR: cast from type pg_catalog.bool to type text allready exist
>
> That's fine.
>
>> When i was looking to upgrade log file in every SQL like: "CREATE
>> FUNCTION" there is "AS '/usr/lib/liblwgeom', " instead of "AS
>> '$libdir/liblwgeom.so.1.2'". Maybe some bug in upgrade script ?
>
> Possibly. I gave up using the upgrade script myself a long time ago as from
> my point of view it's easier just to dump/restore the tables for a version
> upgrade by hand. plus you're guaranteed a clean PostGIS install. I think
> Paul did some work on this in 1.4SVN so things may improve in this area.
Also for me, it is more comfortable to do dump/restore upgrade. I have
also some experience with problematic "hard" upgrades.
Mark, which pg_dump/pg_restore options do You for dumping tables. Can
You explain little bit "You way" ?
How do You extract commands which create old version postgis fuctions ?
Do You extract tables with "-t" options, so the resulting SQL is
containing only CREATE TABLE and INSERT commands?
Ivan
>
>> Do you think it is good idea to copy SQLs creating this functions above
>> from .ascii file (temporary file created by upgrade script), replace
>> $libdir/liblwgeom.so.1.2 with /usr/lib/liblwgeom and run SQL ?
>
> liblwgeom is installed in the PostgreSQL lib directory and not the systen
> lib directory, so no this is not the right thing to do.
>
>> I haven't done "cleaning" described in "Hard upgrade" in postgis
>> documentation. Is is important ? Are missing functions important ?
>
> I'm not sure what you mean here as I don't see any references to cleaning in
> the current manual?
>
>
> ATB,
>
> Mark.
>
> --
> Mark Cave-Ayland - Senior Technical Architect
> PostgreSQL - PostGIS
> Sirius Corporation plc - control through freedom
> http://www.siriusit.co.uk
> t: +44 870 608 0063
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list