[postgis-users] PostGIS - geometry from a stored function?

Eric Bridger eric at gomoos.org
Mon Dec 1 09:38:53 PST 2003


Is it possible to get the geometry from a Postgres stored function using
postGIS.
e.g.

DATA "the_geom from (select * from GetGeom() as new_points using unique
gid using srid=-1"


I tried this with a simple Postgres table function e.g.

CREATE OR REPLACE FUNCTION GetGeom() RETURNS SETOF point_table AS '
select gid, buoy_id, water_depth, btype, the_geom, label_char,
label_theta from point_table;

' LANGUAGE 'sql';

Meanwhile:
DATA "the_geom from point_table" works fine.

Thanks.

Eric






More information about the postgis-users mailing list