[postgis-users] Upgrading from PostgreSQL 8.0 with PostGIS 0. 9 toPostgreSQL 8.1 with PostGIS 1.0
Paul Ramsey
pramsey at refractions.net
Sun Mar 5 14:16:49 PST 2006
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.
Not a nice choice.
P
On 5-Mar-06, at 2:08 PM, Mario Servin wrote:
> Paul,
> Does it mean I will never get from (for example) PGAdmin III a
> table view of my geometry data in human readable format?
> Sometimes it is so easy to change values directly in the view...
> Mario
> ----- Original Message ----- From: "Paul Ramsey"
> <pramsey at refractions.net>
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Sent: Friday, January 20, 2006 1:48 PM
> Subject: Re: [postgis-users] Upgrading from PostgreSQL 8.0 with
> PostGIS 0. 9 toPostgreSQL 8.1 with PostGIS 1.0
>
>
>> Actually, the data is *stored* in a C struct, what you see when
>> you type "select geom from mytable" is the "canonical
>> representation" of the geometry. The canonical representation
>> used to be "well known text" (WKT) which has the advantage of
>> being human readable. The trouble is, the canonical
>> representation is used for things like database backup dump
>> files, and really is spit out any time any client asks for the
>> geometry. That means the data is constantly going from the
>> internal binary form to text to binary, and so on. This can
>> cause very small drifts in the values, which means that it was
>> possible to backup a database table, restore it, and find that
>> the geometries were no longer exactly the same. They were not
>> *very* different, but they were a little different.
>>
>> In general, using the OGC standard representation functions
>> (astext, asbinary) is what people should do when pulling
>> information out of the database. Mapserver's PostGIS support
>> (mappostgis.c) did this, and as a result when we changed the
>> canonical form (and the on-disk form as well) for 1.0 mapserver
>> remained compatible with the new versions of postgis, despite
>> very very substantial changes to postgis.
>>
>> Paul
>>
>> On Jan 20, 2006, at 8:22 AM, Sears, Jeremy wrote:
>>
>>> >>Unfortunately the geom column of my data again appear as a
>>> strange string of characters where I expected to see something
>>> as POINT, LINE etc.
>>>
>>> I asked the same question and was informed that this is normal.
>>> You data should look like incoherent strings. Apparently this is
>>> how the data are stored in newer versions of postgis.
>>>
>>> Glad to help
>>> Jeremy
>>> -----Original Message-----
>>> From: postgis-users-bounces at postgis.refractions.net
>>> [mailto:postgis- users-bounces at postgis.refractions.net]On Behalf
>>> Of Mario Servin
>>> Sent: January 20, 2006 11:01 AM
>>> To: PostGIS Users Discussion
>>> Subject: Re: [postgis-users] Upgrading from PostgreSQL 8.0 with
>>> PostGIS 0. 9 to PostgreSQL 8.1 with PostGIS 1.0
>>>
>>> Thanks Jeremy. I used that and now postgis_restore works to the
>>> end. Unfortunately the geom column of my data again appear as a
>>> strange string of characters where I expected to see something
>>> as POINT, LINE etc. I do not know what else can I do .....
>>>
>>>
>>> On 1/20/06, Sears, Jeremy <Jeremy.Sears at ccrs.nrcan.gc.ca> wrote:
>>> >>The postgis_restore.pl could create the dump list and also the
>>> dump ascii but then gives an error because it does not allow me
>>> to write down the password at the next >>step.
>>>
>>> I was having a simmilar problem. Each time I'd run
>>> postgis_restore.pl It would promt for my password 3 time before
>>> bailing, indicating that the password was incorrect. It was
>>> pointed out to me that this can be avoided by setting the
>>> following environment variables, PGUSER and PGPASSWORD. I also
>>> found it useful to specify PGHOST, PGPORT, and PGDATA as well.
>>> You can set the env variable at the cmmd prompt like this:
>>>
>>> >set PGUSER=username
>>>
>>> or you can set the in controlpanel-->system-->advanced-->
>>>
>>> hope that helps
>>> Jeremy
>>>
>>>
>>> -----Original Message-----
>>> From: postgis-users-bounces at postgis.refractions.net
>>> [mailto:postgis- users-bounces at postgis.refractions.net ]On Behalf
>>> Of Mario Servin
>>> Sent: January 20, 2006 10:06 AM
>>> To: postgis-users at postgis.refractions.net
>>> Subject: [postgis-users] Upgrading from PostgreSQL 8.0 with
>>> PostGIS 0.9 to PostgreSQL 8.1 with PostGIS 1.0
>>>
>>> Hi everybody,
>>> I failed completely to restore my data from a PostgreSQL 8.0 with
>>> PostGIS 0.9 to PostgreSQL 8.1 with PostGIS 1.0. I have both
>>> versions of PosgreSQL running in Windows. I follow instructions
>>> in PostGIS docs from the PostgreSQL installation for upgrading.
>>> The postgis_restore.pl could create the dump list and also the
>>> dump ascii but then gives an error because it does not allow me
>>> to write down the password at the next step. As I know something
>>> about Perl I tried to modify the script without success.
>>> Additionally, I still have the results from the old shp2pgsql
>>> and so I tried to insert the data form psql using \i
>>> mysqlinsertionscript.sql. Tables are created ok, but geom
>>> columns results in meaningless characters where it is supossed
>>> to be something like "POINT (- 66.046532 -21.951437)" for example.
>>> Can anybody help me?.
>>> Regards,
>>> Mario Servin
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> 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