Re: [COMMITTERS] pgsql: Modify tqueue infrastructure to support transient record types.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Modify tqueue infrastructure to support transient record types.
Date: 2015-11-09 15:44:57
Message-ID: CA+TgmobCr1nXSsudZmokfF+h-vNBik_9iROAeqeZvjRgPwBghQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Nov 9, 2015 at 4:06 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Sat, Nov 7, 2015 at 3:29 AM, Robert Haas <rhaas(at)postgresql(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-11-09 15:48:54 pgsql: Add a dummy return statement to TupleQueueRemap.
Previous Message Peter Eisentraut 2015-11-09 15:21:43 pgsql: Translation updates

Browse pgsql-hackers by date

  From Date Subject
Next Message Catalin Iacob 2015-11-09 15:46:00 Re: proposal: PL/Pythonu - function ereport
Previous Message Robert Haas 2015-11-09 15:37:17 Re: Extracting fields from 'infinity'::TIMESTAMP[TZ]