From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pg_get_functiondef(), trailing spaces and + sign |
Date: | 2023-02-27 19:40:08 |
Message-ID: | 8a54a6aa-3dde-8662-382d-a810b6d000c7@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2/27/23 11:34 AM, Ron wrote:
> Is there any direct way in Postgresql to get rid of the frankly
> anti-useful junk at the end of each line (which also infects
> pg_stat_activity.query), or must I resort to sed post-processing?
>
>
Or
\ef foo
> test=# select pg_get_functiondef(oid)
> test-# from pg_proc
> test-# where proname = 'foo';
> pg_get_functiondef
> ----------------------------------------------------
> CREATE OR REPLACE FUNCTION public.foo(bar integer)+
> RETURNS double precision +
> LANGUAGE plpgsql +
> AS $function$ +
> begin +
> return bar * 1.0; +
> end; +
> $function$ +
>
> (1 row)
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2023-02-27 19:47:56 | Re: Tempory table is not getting created inside Function in postgres. |
Previous Message | Adrian Klaver | 2023-02-27 19:38:33 | Re: pg_get_functiondef(), trailing spaces and + sign |