Re: Pl/pgsql functions causing crashes in 8.2.2
От | jon5pg@streamy.com |
---|---|
Тема | Re: Pl/pgsql functions causing crashes in 8.2.2 |
Дата | |
Msg-id | 49232.76.172.130.214.1170753727.squirrel@webmail.streamy.com обсуждение исходный текст |
Ответ на | Pl/pgsql functions causing crashes in 8.2.2 ("Jonathan Gray" <jon5pg@streamy.com>) |
Ответы |
Re: Pl/pgsql functions causing crashes in 8.2.2
|
Список | pgsql-hackers |
Reading the post again I caught a typo in my query. I had been playing with variations of this test to try and get it working, but I have had no success with any combination as long as it returns this kind of type. I was comparing integers to uniqueidentiers, which actually works, but is unrelated to the issue. Should be: > CREATE OR REPLACE FUNCTION test.break_guid (numlower integer, numupper > integer) RETURNS SETOF test.guid_plus AS > $$ > DECLARE > x RECORD; > gplus_ret test.guid_plus; > BEGIN > FOR x IN SELECT id,num FROM test.guid_table WHERE num > numlower AND num > < numupper LOOP > gplus_ret := > (x.id::uniqueidentifier,x.num::integer)::test.guid_plus; > -- I usually do the following: (but tried above with same result) > -- gplus_ret := (x.id,x.num); > RETURN NEXT gplus_ret; > END LOOP; > RETURN; > END; > $$ LANGUAGE plpgsql; Jonathan Gray jon5pg@streamy.com
В списке pgsql-hackers по дате отправления: