Opened 14 years ago

Closed 13 years ago

#661 closed defect (fixed)

Type info of geography columns incomplete - pg_dump output wrong

Reported by: tider Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.3
Component: postgis Version: 1.5.X
Keywords: geography pg_dump Cc:

Description

Steps to reproduce (using interactive psql):

test=# CREATE table test (geom geography(GEOMETRY,4326)); CREATE TABLE test=# \d test

Table "public.test"

Column | Type | Modifiers


geom | geography(4326) |

Note the wrong type "geography(4326)", it should be "geography(GEOMETRY,4326)". This type info is used by pg_dump as well, resulting in a failing CREATE TABLE statement.

Attachments (1)

pg661a.patch (767 bytes ) - added by pramsey 13 years ago.
Does this help?

Download all attachments as: .zip

Change History (5)

comment:1 by tider, 14 years ago

Again, nicer:

Steps to reproduce (using interactive psql):


test=# CREATE table test (geom geography(GEOMETRY,4326));
CREATE TABLE
test=# \d test
         Table "public.test"
 Column |      Type       | Modifiers 
--------+-----------------+-----------
 geom   | geography(4326) | 


Note the wrong type "geography(4326)", it should be "geography(GEOMETRY,4326)". This type info is used by pg_dump as well, resulting in a failing CREATE TABLE statement.

comment:2 by pramsey, 14 years ago

The idea was that geography(geometry,4326) and geography(4326) would be equivalent. I will look and see if it's possible to make the create table statement more liberal.

by pramsey, 13 years ago

Attachment: pg661a.patch added

Does this help?

comment:3 by pramsey, 13 years ago

Fixed in r7248 in trunk and r7247 in 1.5 branch

comment:4 by pramsey, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.