Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebh8l-0004FB-Rp for pgsql-committers@arkaria.postgresql.org; Wed, 17 Jan 2018 06:24:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebh8j-0007E0-RV for pgsql-committers@arkaria.postgresql.org; Wed, 17 Jan 2018 06:24:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebh8j-0007Dn-J0; Wed, 17 Jan 2018 06:24:01 +0000 Received: from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ebh8b-0005cT-ES; Wed, 17 Jan 2018 06:24:00 +0000 Received: from webmailclassic.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:209]) by smtp-cloud9.xs4all.net with ESMTPA id bh8Wey9ML6VzTbh8WeQ6A9; Wed, 17 Jan 2018 07:23:48 +0100 Received: from 2001:983:39b6:1:8e89:a5ff:fe87:3e60 by webmailclassic.xs4all.nl with HTTP (HTTP/1.1 POST); Wed, 17 Jan 2018 07:23:48 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 17 Jan 2018 07:23:48 +0100 From: Erik Rijkers To: Andrew Dunstan Cc: pgsql-committers@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: pgsql: Centralize json and jsonb handling of datetime types In-Reply-To: References: Message-ID: X-Sender: er@xs4all.nl User-Agent: XS4ALL Webmail X-CMAE-Envelope: MS4wfJ9+nQP99ybQ6+FC9IaVK3yzgYawbGAAHWQXiaMyRSrpAWSGK/1/aaNYKtRSTiYmgV9sJIeuluoT96KPp2lIBZV8c+CryC5hQZC2hIysfgI/HieVKXKy OxHLXUccqmXkjEfts7vbXdQShzLT+OJzQg41NtYyx0yKy6LngOwTBcX+MfOpdHh86IaQEZFQMgDRrKyY3Xh2yznHTxNh0aWdynvTcfKbDkZNl7RvR6MuWsi+ pjN1OTwql0cWW6l0CBJjh1Acy9wK1iwiFXt389BmbHHe2X/vFcdT5MJYHpziyNoyxFLO7ZGDlLLlQCW/nFgt4A== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-01-17 01:29, Andrew Dunstan wrote: > Centralize json and jsonb handling of datetime types [...] > https://git.postgresql.org/pg/commitdiff/cc4feded0a31d2b732d4ea68613115cb720e624e > > Modified Files > -------------- > src/backend/utils/adt/date.c | 6 +-- > src/backend/utils/adt/json.c | 122 > ++++++++++++++++++++++++++++++++---------- > src/backend/utils/adt/jsonb.c | 70 ++++-------------------- > src/include/utils/date.h | 4 +- > src/include/utils/jsonapi.h | 2 + > 5 files changed, 109 insertions(+), 95 deletions(-) Latest gcc 7.2.0 compile shows these warnings (I suppose these come from this commit): Compiling core: In file included from gram.y:63:0: ../../../src/include/utils/date.h:76:41: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); ^~~~~ ../../../src/include/utils/date.h:77:46: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); ^~~~~ In file included from formatting.c:92:0: ../../../../src/include/utils/date.h:76:41: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); ^~~~~ ../../../../src/include/utils/date.h:77:46: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); ... while contrib adds: In file included from btree_gin.c:12:0: ../../src/include/utils/date.h:76:41: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); ^~~~~ ../../src/include/utils/date.h:77:46: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); ^~~~~ In file included from btree_utils_num.c:9:0: ../../src/include/utils/date.h:76:41: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); ^~~~~ ../../src/include/utils/date.h:77:46: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); ^~~~~ In file included from btree_time.c:9:0: ../../src/include/utils/date.h:76:41: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); ^~~~~ ../../src/include/utils/date.h:77:46: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); ^~~~~ In file included from btree_date.c:9:0: ../../src/include/utils/date.h:76:41: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int time2tm(TimeADT time, struct pg_tm *tm, fsec_t *fsec); ^~~~~ ../../src/include/utils/date.h:77:46: warning: ‘struct pg_tm’ declared inside parameter list will not be visible outside of this definition or declaration extern int timetz2tm(TimeTzADT *time, struct pg_tm *tm, fsec_t *fsec, int *tzp); No errors, and 'make check' and 'make check-world' are both OK. thanks, Erik Rijkers