Re: Ascii Elephant for text based protocols - Final function proposal - Mailing list pgsql-general

From Charles Clavadetscher
Subject Re: Ascii Elephant for text based protocols - Final function proposal
Date
Msg-id 00ab01d1b041$906b02b0$b1410810$@swisspug.org
Whole thread Raw
In response to Re: Ascii Elephant for text based protocols - Final function proposal  ("Charles Clavadetscher" <clavadetscher@swisspug.org>)
List pgsql-general
Hello again

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Charles
> Clavadetscher
> Sent: Dienstag, 17. Mai 2016 14:50
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Ascii Elephant for text based protocols - Final function proposal
>
> Hello all
>
> > -----Original Message-----
> > From: pgsql-general-owner@postgresql.org
> > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Karsten
> > Hilbert
> > Sent: Dienstag, 17. Mai 2016 09:23
> > To: pgsql-general@postgresql.org
> > Subject: Re: [GENERAL] Ascii Elephant for text based protocols - Final
> >
> > On Tue, May 17, 2016 at 06:58:14AM +0200, Charles Clavadetscher wrote:
> >
> > > A question to the naming. I find pg_logo() also a good name, but is
> > > the prefix pg_* not reserved for system functions? Of course I could
> > > use the name I want, but was wondering if there is a policy or a
> > > best practice in this area.
> >
> > pg_logo would only be suitable if it got blessing from "higher up".
>
> Well. This question will be addressed when the body of the function is complete. Now I have a proposal which is in
> the attachment.

In my function there was a problem with casting of values to real instead of numeric to compute the number of spaces
requiredon the 
right side of a string to be centered. In some specific string lengths the rounding was not correct.
Sorry. This should now be ok.

In the attachment the corrected version.

Bye
Charles


Attachment

pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: PG wire protocol question
Next
From: Bryan Nuse
Date:
Subject: Re: Ascii Elephant for text based protocols - Final