text_combined: terry yapt yapttechnovellcom hi get run think mistaking basic concept big brainlock somebody know problem execute function thanks advance drop table test create table test clave numeric70 null primary key clave without oids drop function f_testnumeric70 numeric70 create replace function f_testnumeric70 numeric70 returns timestamp declare p_datod alias 1 p_datoh alias 2 tdesde timestamp thasta timestamp begin tdesde x p_datodp_datoh loop insert test values x end loop thasta tdesde return thasta commit end language plpgsql select f_test19 end broadcast tip 1 subscribe unsubscribe commands go majordomopostgresqlorg tue 10 sep 2002 173204 0200 novice plpgsql returns timestamp type