[postgis-users] Problem with syntax in function
Ludovico Bianchini
metlud at yahoo.it
Tue May 22 07:21:42 PDT 2007
Hi,
I've a table with a geometry column (POINT).
I've this working query to extract data:
select * from myschema.mytable where (geom_column &&
SetSRID('BOX3D(1754642 5059039, 1754644
5059041)'::box3d, 26591))
I've tried to create a function from this query but I
don't understand the use of quote to concat the string
arguments. I've tried this
CREATE OR REPLACE FUNCTION
myschema.sel_by_pos(varchar, varchar, varchar,
varchar)
RETURNS SETOF myschema.mytable AS
'select * from myschema.mytable where (geom_column &&
SetSRID(''BOX3D(' || $1 || ' ' || $2 || ', ' || $3 ||
' ' || $4 || ')''::box3d, 26591))'
LANGUAGE 'sql' VOLATILE;
and I get ERROR: syntax error at or near "||" at
character 223
I don't understand where is the problem...
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail:
http://it.docs.yahoo.com/nowyoucan.html
More information about the postgis-users
mailing list