pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Performance improvements for src/port/snprintf.c
Date: Wed, 03 Oct 2018 13:51:38 -0400
Message-ID: <2845.1538589098@sss.pgh.pa.us> (raw)
In-Reply-To: <20181003173936.uv3udmpovqizg4x6@alap3.anarazel.de>
References: <14302.1538005507@sss.pgh.pa.us>
	<20180926235821.zmpxqv66ob7v2ffi@alap3.anarazel.de>
	<15882.1538007944@sss.pgh.pa.us>
	<20180927004022.lfhffbj3roxzf5ca@alap3.anarazel.de>
	<20180927005705.shbl3n5hq3t65n2j@alap3.anarazel.de>
	<20180927011814.kpncoksuqq3gy44s@alap3.anarazel.de>
	<15652.1538011825@sss.pgh.pa.us>
	<20181002201328.kauaofescppm54gq@alap3.anarazel.de>
	<30898.1538517873@sss.pgh.pa.us>
	<1680.1538587115@sss.pgh.pa.us>
	<20181003173936.uv3udmpovqizg4x6@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2018-10-03 13:18:35 -0400, Tom Lane wrote:
>> Having said that, maybe there's a case for changing the type spec
>> in only the va_arg() call, and leaving snprintf's related local
>> variables as int64.  (Is that what you actually meant?)  Then,
>> if long long really is different from int64, at least we have
>> predictable truncation behavior after fetching the value, rather
>> than undefined behavior while fetching it.

> Hm. I guess that'd be a bit better, but I'm not sure it's worth it. How
> about we simply add a static assert that long long isn't bigger than
> int64?

WFM, I'll make it happen.

			regards, tom lane




view thread (65+ messages)  latest in thread

Message-ID: <2845.1538589098@sss.pgh.pa.us>
Permalink:  ../2845.1538589098@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2845.1538589098@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, a.kuzmenkov@postgrespro.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: Performance improvements for src/port/snprintf.c
  In-Reply-To: <2845.1538589098@sss.pgh.pa.us>

* 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