Re: pgsql: Centralize json and jsonb handling of datetime types

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Centralize json and jsonb handling of datetime types
Date: 2018-01-17 08:34:52
Message-ID: 037c6f64-7059-41f6-0674-44694ceba972@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 01/17/2018 12:34 AM, Amit Langote wrote:
> On Wed, Jan 17, 2018 at 9:29 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> Centralize json and jsonb handling of datetime types
> [ ... ]
>
>> src/include/utils/date.h | 4 +-
> I noticed that these changes cause the following warning to be emitted
> when compiling with gcc (GCC) 6.2.0:
>
> 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);
>
> Attached is a fix.
>

Thanks, this is the right fix but in the wrong place. I have added the
include in the file where pg_tm is actually used.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Langote 2018-01-17 09:10:50 Re: pgsql: Centralize json and jsonb handling of datetime types
Previous Message Andrew Dunstan 2018-01-17 08:33:21 pgsql: Fix compiler warnings due to commit cc4feded

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2018-01-17 08:36:31 Re: [HACKERS] Deadlock in XLogInsert at AIX
Previous Message Marina Polyakova 2018-01-17 07:59:22 Re: WIP Patch: Precalculate stable functions, infrastructure v1