Re: Suppress decimal point like digits in to_char? - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Suppress decimal point like digits in to_char?
Date
Msg-id CA+bJJbzZtTxAfinVZbffPao9ihATXjGh6oJups8BbFfDWN-0=w@mail.gmail.com
Whole thread Raw
In response to Re: Suppress decimal point like digits in to_char?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Hi David:

On Mon, Mar 14, 2016 at 4:22 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:

>> But a right-aligning string output routine needs to be used.
...

>> Summarising, any combination can be easily done with a single round of
>> replace.

> See also:
> http://www.postgresql.org/docs/9.5/interactive/functions-string.html
> format(formatstr text [, formatarg "any" [, ...] ])

You mean to use it to right align the replaced string ( i.e.
format('%12s',replace(...)) ) or is there a code I do not know off
which can be used to achieve the global result ( I use it but it seems
to be like a restricted sprintf which can not do the supress the zero
stuff ) ?

Francisco Olarte.


pgsql-general by date:

Previous
From: "Frank Millman"
Date:
Subject: Re: Unexpected result using floor() function
Next
From: Ken Tanzer
Date:
Subject: Re: Suppress decimal point like digits in to_char?