David, What you are asking I don't think is doable.
Short-Answer - your query never hits PostGIS land to be caught. Longer answer: The error you get below is a PostgreSQL error and that is because it doesn't know which function to send the request to. Since PostgreSQL functions are overloaded, unlike some other databases, the name of a function is not sufficient to look up a function. Leo http://www.postgis.us -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of David Fawcett Sent: Monday, September 27, 2010 3:37 PM To: PostGIS Users Discussion Subject: [postgis-users] Possible Better Error Message? 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 _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
