|
|||||
| | |||||
CREATE or replace FUNCTION get_pass(text) RETURNS setof joe.passwd_type as
'
declare
abc alias for $1;
row passwd_type%ROWTYPE;
r record;
begin
for r in SELECT * from passwd where location like ''%''|| abc || ''%''
loop
row.uname = r.uname;
row.pass = r.pass;
row.location = r.location;
return next row;
end loop;
return next row;
return;
end
'
LANGUAGE 'plpgsql';
--create type passwd_type as (uname character varying(30), pass character varying(30), location character varying(255) );
| Leave a Reply |