Plpgsql qestion

From: "Yury Don" <yura(at)vpcit(dot)ru>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Plpgsql qestion
Date: 1999-11-04 04:39:21
Message-ID: 005a01bf267e$90784880$e23426c3@vpcit.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All.

Is it possible to create function (preferably in plpgsql) which gets table
name and field name as an arguments and does select something from this
table?
Something like

CREATE FUNCTION "ft"
(text, text)
RETURNS int4
AS '
declare
res int4;
begin
select max($2) from $1 into res;
return res;
end;
'
LANGUAGE 'plpgsql'

Sincerely yours, Yury.
don.web-page.net, ICQ 11831432

Browse pgsql-general by date

  From Date Subject
Next Message Gene Selkov, Jr. 1999-11-04 05:23:12 Re: [GENERAL] indexed regex select optimisation missing?
Previous Message Collin W. Hitchcock 1999-11-04 04:13:42 Re: Installing Postgresql