Re: Setting the number of digits after the decimal point with a psql's pset variable

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Guillaume Lelarge <guillaume(dot)lelarge(at)dalibo(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Setting the number of digits after the decimal point with a psql's pset variable
Date: 2026-10-30 19:47:03
Message-ID: auT0N7oFol0JOVtv@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 30, 2026 at 08:41:35AM +0000, Bertrand Drouvot wrote:
> On Thu, Oct 29, 2026 at 09:45:54PM +0100, Guillaume Lelarge wrote:
>> Any comments welcome :)
>
> I did not look at the details but I was a bit skeptical at first, as I wondered
> whether this would open the door to similar formatting options for other data
> types. Then I did some research and found that 645cb44c5 kind of already opened
> the door, so I'm not sure what to think about it.

I'm +1 for the idea. I've actually wanted something like $subject a handful
of times in the past, usually when trying to format a table to be readable
on the lists. It'd be nice to not have to amend the query with calls to
round().

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-10-30 19:49:51 Re: tests: Don't use the initdb template for older installations
Previous Message Nikolay Samokhvalov 2026-10-30 19:33:32 Re: pg_*_advice: tsv load failure, etc.