From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: pg_get_functiondef(), trailing spaces and + sign
Date: Mon, 27 Feb 2023 13:34:30 -0600
Message-ID: <5e5c5f5f-7b98-fab1-ae9b-4072ee64058c@gmail.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: pg_get_functiondef(), trailing spaces and + sign
In-Reply-To: <5e5c5f5f-7b98-fab1-ae9b-4072ee64058c@gmail.com>
References: <5e5c5f5f-7b98-fab1-ae9b-4072ee64058c@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox