Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-12 Thread Merlin Moncure
On Mon, Sep 8, 2025 at 3:37 AM PALAYRET Jacques wrote: > Hello, > Thanks for your response. > > # Currently, I have a function text and a function array with *the same > body* but a *distinct type return*. > -> Example with the array of text function : > SELECT public.calfxi3s_all_elements_text_a

Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-08 Thread PALAYRET Jacques
Cc: [email protected] Envoyé: Vendredi 5 Septembre 2025 18:21:08 Objet: Re: PostgreSQL include directive in plpgsql language PL/pgSQL On Fri, Sep 5, 2025 at 7:14 AM PALAYRET Jacques < [ mailto:[email protected] | [email protected] ] > wrote: Hello, In

Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-08 Thread Greg Sabino Mullane
On Mon, Sep 8, 2025 at 5:37 AM PALAYRET Jacques wrote: > I can manage with this method, but it shoud be better with a include > directive. > Even if we had includes, I would strongly advise "this method" which seems pretty clean and maintainable. What is the issue with SQL functions that call a

Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-05 Thread Ron Johnson
On Fri, Sep 5, 2025 at 9:14 AM PALAYRET Jacques wrote: > 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 oth

Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-05 Thread Merlin Moncure
On Fri, Sep 5, 2025 at 7:14 AM PALAYRET Jacques wrote: > 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 oth

Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-05 Thread Tom Lane
"David G. Johnston" writes: > On Friday, September 5, 2025, PALAYRET Jacques > wrote: >> Is there an equivalent of #include (include directive) in functions >> (written in plpgsql language)? > No, there is not. And there won't be one in the future either, as it would give server filesystem acce

Re: PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-05 Thread David G. Johnston
On Friday, September 5, 2025, PALAYRET Jacques wrote: > > > Is there an equivalent of #include (include directive) in functions > (written in plpgsql language)? > No, there is not. David J.

PostgreSQL include directive in plpgsql language PL/pgSQL

2025-09-05 Thread PALAYRET Jacques
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