[postgis-users] Possible Better Error Message?

David Fawcett david.fawcett at gmail.com
Mon Sep 27 12:36:40 PDT 2010


I have a question about error messages.  I was attempting to use
ST_SetSRID() and the error message that I got definitely pointed me in
the wrong direction (see below).

The problem was that I was omitting the second arg.

It would be great if this case threw an error that said something
like, 'incorrect number of arguments, ST_SetSRID(geometry, srid)
requires two arguments'.

I have no idea how the error messages are implemented, so I don't know
if this is a reasonable suggestion/request.  I am willing to file a
ticket if it would be useful.

David.


ERROR:  function st_setsrid(geometry) does not exist
LINE 1: SELECT qid, st_distance(ST_Centroid(the_geom), ST_Setsrid(ST...
                                                       ^
HINT:  No function matches the given name and argument types. You
might need to add explicit type casts.


********** Error **********

ERROR: function st_setsrid(geometry) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might
need to add explicit type casts.
Character: 48



More information about the postgis-users mailing list