i have a table with three columns.
tran_event_cd, event_cd,party_cd.
can i pass the column name in the function.
Expand|Select|Wrap|Line Numbers
- create or replace function fn_one(int8,int8)
- returns setof tbl_one as
- '
- declare
- r tbl_one%rowtype;
- a alias for $1;
- b alias for $2;
- begin
- for r in select tran_event_cd, event_cd,party_cd
- from tran_event where $1=$2
- loop
- return next r;
- end loop;
- return ''a'';
- end'
- language 'plpgsql' volatile;
is it possible to do so.
plz any help is appreciated.
TIA