Re: RE : Record unassigned yet
| От | Richard Huxton |
|---|---|
| Тема | Re: RE : Record unassigned yet |
| Дата | |
| Msg-id | 415D4372.8090303@archonet.com обсуждение исходный текст |
| Ответ на | RE : Record unassigned yet ("Johann Robette" <jrobette@onyme.com>) |
| Список | pgsql-hackers |
Johann Robette wrote: > Oh sorry about that! > No, I was alright in the syntax. Both are defined as current. > I can't find where the problem lies... The following works fine for me. === BEGIN test === DROP TABLE employees; CREATE TABLE employees (id integer, name text); COPY employees FROM stdin; 1 Aaron Aardvark 2 Betty Bee 3 Carl Cat \. CREATE OR REPLACE FUNCTION emp_test_fn() RETURNS boolean AS ' DECLARE current RECORD; Tmp integer; BEGIN FOR current IN SELECT * FROM employees LOOP Tmp := current.id; RAISE NOTICE ''tmp = %'', Tmp; ENDLOOP; RETURN true; END ' LANGUAGE 'plpgsql'; SELECT emp_test_fn(); === END test === PS - please reply to the -general list not -hackers. -- Richard Huxton Archonet Ltd
В списке pgsql-hackers по дате отправления: