From: | Kirk Wolak <wolakk(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | 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 22:40:34 |
Message-ID: | CACLU5mRs6d2tq5zybUa86WGL2NA-9Mg7Qn8zCT4h8D=98GWNHw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Feb 27, 2023 at 2:40 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
> 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
>
that will edit the function, I think he meant
\sf foo
which will show you the content of the function!
> > 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 | mirabilos | 2023-02-27 23:11:49 | DISTINCT *and* ORDER BY in aggregate functions on expressions(!) |
Previous Message | David G. Johnston | 2023-02-27 20:40:42 | Re: Tempory table is not getting created inside Function in postgres. |