Re: [SQL] Point and function help

2003-12-25 Thread Andy Lewis
and function help "Andy Lewis" <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE FUNCTION public.map_point(pg_catalog.varchar, > pg_catalog.varchar, pg_catalog.varchar) > RETURNS point AS > 'SELECT map_loc from zip_code where zip = \'$3\' and lower(state

Re: [SQL] Point and function help

2003-12-25 Thread Tom Lane
"Andy Lewis" <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE FUNCTION public.map_point(pg_catalog.varchar, > pg_catalog.varchar, pg_catalog.varchar) > RETURNS point AS > 'SELECT map_loc from zip_code where zip = \'$3\' and lower(state) = > lower(\'$2\') and lower(city) = lower(\'$1\')' > LANGUA

[SQL] Point and function help

2003-12-25 Thread Andy Lewis
Title: Message Hello all merry XMAS!   I'm trying to create a function that will return a point and having little luck in returning results. Basically I have a zip code DB complete with city, state and zip pre-populated.   What I would like to do is create this function:   CREATE OR REPLACE