From: | Ron <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | pg_get_functiondef(), trailing spaces and + sign |
Date: | 2023-02-27 19:34:30 |
Message-ID: | 5e5c5f5f-7b98-fab1-ae9b-4072ee64058c@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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?
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)
--
Born in Arizona, moved to Babylonia.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2023-02-27 19:38:33 | Re: pg_get_functiondef(), trailing spaces and + sign |
Previous Message | nikhil raj | 2023-02-27 19:10:33 | Tempory table is not getting created inside Function in postgres. |