Used ST_AsText for testing PostGIS raw query

AsText will not be supported in further versions of PostGIS (>=2).
This commit is contained in:
Claude Paroz 2012-09-15 11:56:39 +02:00
parent abfba3bb65
commit 65793d714c
2 changed files with 4 additions and 3 deletions

View file

@ -674,8 +674,8 @@ __ http://spatialreference.org/ref/epsg/32140/
.. admonition:: Raw queries
When using :doc:`raw queries </topics/db/sql>`, you should generally wrap
your geometry fields with the ``asText()`` SQL function so as the field
value will be recognized by GEOS::
your geometry fields with the ``asText()`` SQL function (or ``ST_AsText``
for PostGIS) so as the field value will be recognized by GEOS::
City.objects.raw('SELECT id, name, asText(point) from myapp_city')