[postgis-users] Plpgsql function

eehab hamzeh eehab40 at hotmail.com
Thu Feb 19 10:04:14 PST 2009



Hello,

I have the following plpgsql function the output are 3 values. i need to insert these values to the table.
when i run the function, only the first value of the result are inserted 
how i can insert the rest of the result to the table

CREATE OR REPLACE FUNCTION eehab(integer) RETURNS integer AS

declare
mypoint alias for $1;
myresult integer;

begin

select into myresult distinct o from ramadan where o=mypoint or 
a=mypoint union select distinct a from ramadan where o=mypoint or a=mypoint;

insert into eehab values (myresult);

return myresult;

end;

'LANGUAGE 'plpgsql' 


kind regards



_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090219/774310b1/attachment.html>


More information about the postgis-users mailing list