pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Centralize definition of integer limits.
Date: Mon, 30 Mar 2015 12:51:24 +0200
Message-ID: <20150330105124.GF4878@alap3.anarazel.de> (raw)
In-Reply-To: <CAB7nPqTsbK683aXYGHz+JjYU2zYuk2hrETHBhrUVR+hDQLn7hQ@mail.gmail.com>
References: <E1YatAv-0007cu-KW@gemulon.postgresql.org>
	<CAB7nPqRqce4hd7UXRw08TGaDsDz04DbecNiU3c0O_7S4YrAdaQ@mail.gmail.com>
	<CAB7nPqTsbK683aXYGHz+JjYU2zYuk2hrETHBhrUVR+hDQLn7hQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 2015-03-30 14:27:20 +0900, Michael Paquier wrote:
> INT64_MODIFIER is "l" on OSX, causing this warning. Perhaps there is
> something better to do instead of casting blindly to int64. Thoughts?
> -- 
> Michael

> diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
> index 7da5c41..a15c875 100644
> --- a/src/bin/pg_dump/pg_dump.c
> +++ b/src/bin/pg_dump/pg_dump.c
> @@ -14545,8 +14545,8 @@ dumpSequence(Archive *fout, DumpOptions *dopt, TableInfo *tbinfo)
>  	/* Make sure we are in proper schema */
>  	selectSourceSchema(fout, tbinfo->dobj.namespace->dobj.name);
>  
> -	snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE);
> -	snprintf(bufx, sizeof(bufx), INT64_FORMAT, SEQ_MAXVALUE);
> +	snprintf(bufm, sizeof(bufm), INT64_FORMAT, (int64) SEQ_MINVALUE);
> +	snprintf(bufx, sizeof(bufx), INT64_FORMAT, (int64) SEQ_MAXVALUE);
>  

I think that's entirely the wrong approach. ISTM that, independent from
this patch, INT64CONST/HAVE_LL_CONSTANTS are wrong for your
environment. The HAVE_LL_CONSTANTS test is probably too simplistic.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (14+ messages)  latest in thread

Message-ID: <20150330105124.GF4878@alap3.anarazel.de>
Permalink:  ../20150330105124.GF4878@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20150330105124.GF4878@alap3.anarazel.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, michael.paquier@gmail.com
  Subject: Re: pgsql: Centralize definition of integer limits.
  In-Reply-To: <20150330105124.GF4878@alap3.anarazel.de>
  References: <E1YatAv-0007cu-KW@gemulon.postgresql.org> <CAB7nPqRqce4hd7UXRw08TGaDsDz04DbecNiU3c0O_7S4YrAdaQ@mail.gmail.com> <CAB7nPqTsbK683aXYGHz+JjYU2zYuk2hrETHBhrUVR+hDQLn7hQ@mail.gmail.com> <20150330105124.GF4878@alap3.anarazel.de>

* 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