-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi eehab,
eehab hamzeh wrote: > > 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 > your function returns one integer. look at returning setof integer or array in plpgsql documentation. > 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 Learn more! > <http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE> > > > ------------------------------------------------------------------------ > > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users - -- - -- best regards, alex -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iJwEAQECAAYFAkmd95IACgkQ2nA3WyrfyeOtEAP+KBQ/xoUwf33/zJfBajuabJjC yo1nLEgugirv+/ZFGXTohwAUkeNtCWPTWO7ewcmizBqIRhXBsDiyx3EHxV4rEcUj WErT7IECs+gaqBHLtGSeMH7ceUShVCWp4LgnP+yTvnZsbuYjadoELfL30YV/Tux5 yLML7BUen0WnfWN0dR8= =0vFn -----END PGP SIGNATURE----- _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
