2015年4月6日月曜日

postgis: 関数 ST_AsGeoJSON はユニークではありません 備忘録

function ST_AsGeoJSON is not unique 関数 ST_AsGeoJSON がユニークではありません。 こんなエラーが出た場合。 バージョンアップしてる環境に、古いDB をリストアすると、PostGIS の残骸が追加されるので、削除が必要
DROP FUNCTION IF EXISTS ST_AsGeoJson(geometry); -- this one changed to use default args 
DROP FUNCTION IF EXISTS ST_AsGeoJson(geography); -- this one changed to use default args 
DROP FUNCTION IF EXISTS ST_AsGeoJson(geometry,int4); -- this one changed to use default args 
DROP FUNCTION IF EXISTS ST_AsGeoJson(geography,int4); -- this one changed to use default args 
DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geometry); -- this one changed to use default args
DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geography); -- this one changed to use default args
DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geometry,int4); -- this one changed to use default args
DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geography,int4); -- this one changed to use default args
http://stackoverflow.com/questions/24204589/error-using-st-asgeojson-with-postgis