[Django] #16184: GeoDjango inspectdb fails for PostGIS

13 views
Skip to first unread message

Django

unread,
Jun 9, 2011, 7:49:34 AM6/9/11
to django-...@googlegroups.com
#16184: GeoDjango inspectdb fails for PostGIS
----------------------------+----------------------------
Reporter: radim.blazek@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: GIS
Version: 1.3 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------+----------------------------
!GeoDjango inspectdb fails for PostGIS if there are more data types
'geometry' (in more schemas) because
PostGISIntrospection.get_postgis_types() is taking simply the first one.
Patch is attached.

Another problem is that PostGISIntrospection.get_geometry_type() raises
exception if a geometry column has no record in geometry_column which is
quite usual. In that case I would suggest to return simply
{{{
return 'TextField', {}
}}}
instead of raising exception.

--
Ticket URL: <https://code.djangoproject.com/ticket/16184>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 17, 2011, 4:07:12 AM6/17/11
to django-...@googlegroups.com
#16184: GeoDjango inspectdb fails for PostGIS
------------------------------------------+------------------------
Reporter: radim.blazek@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: GIS
Version: SVN | Severity: Normal
Resolution: | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Changes (by bpeschier):

* needs_better_patch: => 0
* has_patch: 0 => 1
* version: 1.3 => SVN
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/16184#comment:1>

Django

unread,
Jul 7, 2011, 4:00:30 AM7/7/11
to django-...@googlegroups.com
#16184: GeoDjango inspectdb fails for PostGIS
------------------------------------------+------------------------
Reporter: radim.blazek@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: GIS
Version: SVN | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 1
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Changes (by aaugustin):

* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/16184#comment:2>

Django

unread,
Jul 31, 2011, 6:16:39 PM7/31/11
to django-...@googlegroups.com
#16184: GeoDjango inspectdb fails for PostGIS
------------------------------------------+---------------------------
Reporter: radim.blazek@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: GIS
Version: SVN | Severity: Normal
Resolution: | Keywords: inspectdb
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 1
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+---------------------------
Changes (by ramiro):

* keywords: => inspectdb


--
Ticket URL: <https://code.djangoproject.com/ticket/16184#comment:3>

Django

unread,
Sep 11, 2013, 3:50:53 AM9/11/13
to django-...@googlegroups.com
#16184: GeoDjango inspectdb fails for PostGIS
--------------------------------+------------------------------------

Reporter: radim.blazek@… | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master

Severity: Normal | Resolution:
Keywords: inspectdb | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------

Comment (by anonymous):

Doesn't work for two geometry-columns in one Table!

--
Ticket URL: <https://code.djangoproject.com/ticket/16184#comment:4>

Django

unread,
Jun 28, 2014, 10:33:16 AM6/28/14
to django-...@googlegroups.com
#16184: GeoDjango inspectdb fails for PostGIS
--------------------------------+------------------------------------
Reporter: radim.blazek@… | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: inspectdb | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"f12b68af71efa0b061710c83364f231734d07e55"]:
{{{
#!CommitTicketReference repository=""
revision="f12b68af71efa0b061710c83364f231734d07e55"
Fixed #16184 -- Fixed multiple PostGIS types introspection

Thanks radim....@gmail.com for the report and initial patch.
Testing is tricky, as the failure condition is a bit of an edge
case. inspectapp.InspectDbTests should at least guarantee non
regression.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/16184#comment:5>

Reply all
Reply to author
Forward
0 new messages