Re: [COMMITTERS] pgsql: Modify tqueue infrastructure to support transient record types. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [COMMITTERS] pgsql: Modify tqueue infrastructure to support transient record types.
Date
Msg-id CA+TgmobCr1nXSsudZmokfF+h-vNBik_9iROAeqeZvjRgPwBghQ@mail.gmail.com
Whole thread Raw
List pgsql-hackers
On Mon, Nov 9, 2015 at 4:06 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Sat, Nov 7, 2015 at 3:29 AM, Robert Haas <rhaas@postgresql.org> wrote:
>> Modify tqueue infrastructure to support transient record types.
>
> I am getting below compiler warning on Windows:
> tqueue.c(662): warning C4715: 'TupleQueueRemap' : not all control paths
> return a value

Well, that sucks.  Apparently, your Windows compiler thinks
elog(ERROR, ...) might return.  Apparently
b853eb97182079dcd30b4f52576bd5d6c275ee71 wasn't good enough for your
compiler; I wonder why not.

> Attached patch fixes the problem.

I don't want to do that, because adding a default: case to the switch
will prevent the compiler from complaining if somebody introduces
another enum value in the future.  Instead, we can just add a dummy
return at the end of the function.  I'll go do that.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]
Next
From: Catalin Iacob
Date:
Subject: Re: proposal: PL/Pythonu - function ereport