Re: Function example

Поиск
Список
Период
Сортировка
От Masse Jacques
Тема Re: Function example
Дата
Msg-id 0B87317EA62BD211A02A00A0C9DFB7EC9B5F10@hermes.bordeaux.cemagref.fr
обсуждение исходный текст
Ответ на Function example  ("Roberto de Amorim" <roberto@smartbit.inf.br>)
Список pgsql-general
Declarations with 2 int as parameters returning an int.
You use echnum1 and echnum2 as variable name in the body of the function


______
CREATE FUNCTION ps_desc(int4, int4) RETURNS int4 AS '
DECLARE id int4;
DECLARE echnum1 ALIAS FOR $1;
DECLARE echnum2 ALIAS FOR $2;
DECLARE nlignes integer;
_____
___________________________________________
Jacques Massé
Tel. 33 (0)5 57 89 08 11 - Fax 33 (0)5 57 89 08 01
___________________________________________




-----Message d'origine-----
De : Roberto de Amorim [mailto:roberto@smartbit.inf.br]
Envoyé : mercredi 26 février 2003 13:55
À : pgsql-general@postgresql.org
Objet : [GENERAL] Function example


could anyone send me an example of CREATE FINTION using 'plpgsql' as
language and using paramters (more then 1)?
please

I don't know how to manipulate the params into the function...

TIA

Roberto de Amorim


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

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

Предыдущее
От: "Roberto de Amorim"
Дата:
Сообщение: Function example
Следующее
От: Patrik Kudo
Дата:
Сообщение: index usage (and foreign keys/triggers)