On Fri, Oct 8, 2010 at 7:32 PM, Charles Galpin <[email protected]> wrote:
> Any idea how I can figure out whats going wrong here? I have other sql
> views working like this but for some reason this one doesn't.
>
> I have a function declared
>
> FUNCTION myfunc( integer, char varying) RETURNS SETOF links
>
> where links is a table I have. Calling the function outside of geoserver
> works fine
>
> In my sql view I can use things like
>
> select * from myfunc(2,null)
> select * from myfunc(2,'%st_name%')
>
> but as soon as I try use a parameter for the first argument I get "ERROR:
> syntax error at or near "," Position: 60" when I try generate the attributes
> or save.
>
> select * from myfunc(%count%,'%st_name%')
>
> I have made sure the validation regular expression is valid for an integer
> too. If I enclose the first parameter in single quotes, geoserver complains
> appropriately that it expects an integer. I have other views using integer
> parameters to functions so don't know why this one is different.
>
> I have enabled verbose logging but the stack trace doesn't really offer any
> more info
>
I don't exaclty know what is going on, but sql views params just make a text
substitution,
so you should find the exact query GeoServer is sending to the database in
the logs
somewhere before the exception.
Once you have that sql you can what's wrong and hopefully find a solution
Cheers
Andrea
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users