[postgis-users] Upgrading from PostgreSQL 8.0 with PostGIS 0. 9 toPostgreSQL 8.1 with PostGIS 1.0

Markus Schaber schabi at logix-tt.com
Tue Mar 7 11:52:57 PST 2006


Hi, Paul,

Paul Ramsey wrote:
> As of this moment, no.
> But the benefit/drawback ratio of the change to hexEWKB is starting  to
> seem a little less compelling as time goes by.  The trouble is, 
> changing the canonical format involves changes in lots of other  places,
> because many apps (sadly) read the data directly instead of  wrapping
> them in formatting functions (like asbinary, or astext).  So 
> re-changing it back to a WKT derivative would cause another cascade  of
> application failures.

Well, parsing both formats is not difficult (and what's actually done to
read old dumps).

We could make the text canonical rep configurable via a config variable.
(I would keep EWKB as binary canonical rep.) PostgreSQL allows plugins
to add custom config variable classes.

http://www.postgresql.org/docs/8.1/static/runtime-config-custom.html

We could add a variable class "postgis" and then PostGIS code could
inspect postgis.canonicalrep to see which output format to use.

This would allow us to have the default of hexEWKB, and then the user
could override this globally, per database and per session via
postgresql.conf, ALTER DATABASE SET and SET.

We could provide hexEWKB, EWKT and plain WKT as options.

Using this infrastructure, we could also provide some other
configuration options, e. G. whether SRID=-1 should be compatible with
other SRIDs, or a default SRID for geometry input.

HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



More information about the postgis-users mailing list