PLpgSQL-Problem

Поиск
Список
Период
Сортировка
От Thomas Chille
Тема PLpgSQL-Problem
Дата
Msg-id 015c01c422f9$b17655a0$500a0a0a@spoon.de
обсуждение исходный текст
Ответы Re: PLpgSQL-Problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

i am playing around with PLpgSQL and can not solve one problem: I am fetching some rows of a special rowtype and wanna
givethis 
rows step by step to a function with this rowtype as parameter.

evertime i get the errormessage: ERROR:  Attribut »_row« not found

but the Attribut exists and has values in his fields. i have absolutly no idea was happens there. can someone help me
please?

thanx
thomas

-------snip function 1

CREATE OR REPLACE FUNCTION "public"."compress_main" (date) RETURNS boolean AS'
DECLARE
    _day ALIAS FOR $1;
    _row public.tmp_order_data%ROWTYPE;
    _result boolean;
    eb bigint;
BEGIN

    DELETE FROM hlp_operator WHERE selling_date = _day;

    FOR _row IN
        SELECT * FROM tmp_order_data WHERE business_day = _day ORDER BY transactiontime
    LOOP
        IF _row.id_transactiontype = 100 THEN
            SELECT INTO _result compress_100(_row);
        END IF;
    END LOOP;

    RETURN TRUE;
END;
'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;

-------snip function 2:

CREATE OR REPLACE FUNCTION "public"."compress_100" ("public"."tmp_order_data") RETURNS boolean AS'
DECLARE
    _record ALIAS FOR $1;
    _shift int8;
BEGIN

    /* any code */

    RETURN TRUE;
END;
'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;


В списке pgsql-general по дате отправления:

Предыдущее
От: Sebastian Böck
Дата:
Сообщение: Problems with Triggers
Следующее
От: Martin Marques
Дата:
Сообщение: Re: Problems with Triggers