PostgreSQL include directive in plpgsql language PL/pgSQL
От | PALAYRET Jacques |
---|---|
Тема | PostgreSQL include directive in plpgsql language PL/pgSQL |
Дата | |
Msg-id | 1985501673.206991527.1757078030654.JavaMail.zimbra@meteo.fr обсуждение исходный текст |
Ответы |
Re: PostgreSQL include directive in plpgsql language PL/pgSQL
Re: PostgreSQL include directive in plpgsql language PL/pgSQL Re: PostgreSQL include directive in plpgsql language PL/pgSQL |
Список | pgsql-general |
Hello,
In a PL/pgSQL function, there is no command for sharing a common part of the body of several functions, is there?
In my case, I would like a function that returns a numeric value; this value is associated with several other parameters, some numeric and others textual.
It would not be practical for maintenance to have several functions (one function for each given parameter) with much of the code being identical.
Presently, I have a text function with all the parameters in return and a function for each parameter based on the first one (with all the parameters), using substr(), position(), etc.
For me, I think it would be easier (and perhaps faster) to use some kind of #include in the body of all the functions.
Is there an equivalent of #include (include directive) in functions (written in plpgsql language)?
Regards
In a PL/pgSQL function, there is no command for sharing a common part of the body of several functions, is there?
In my case, I would like a function that returns a numeric value; this value is associated with several other parameters, some numeric and others textual.
It would not be practical for maintenance to have several functions (one function for each given parameter) with much of the code being identical.
Presently, I have a text function with all the parameters in return and a function for each parameter based on the first one (with all the parameters), using substr(), position(), etc.
For me, I think it would be easier (and perhaps faster) to use some kind of #include in the body of all the functions.
Is there an equivalent of #include (include directive) in functions (written in plpgsql language)?
Regards
----- Météo-France -----
PALAYRET Jacques
PALAYRET Jacques
В списке pgsql-general по дате отправления: