Re: pgsql: Remove dependency on HeapTuple from predicate locking functions. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Remove dependency on HeapTuple from predicate locking functions.
Date
Msg-id 27300.1580240388@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Remove dependency on HeapTuple from predicate locking functions.  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-committers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Wed, Jan 29, 2020 at 4:05 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> There is absolutely no question that the original coding is illegal
>> per spec, and it isn't even a particularly useful shorthand; so why
>> can't we get even a warning about it?

> $ cc -c -Wpedantic test.c
> test.c:2:12: warning: void function 'g' should not return void
> expression [-Wpedantic]
> void g() { return f(); }
>            ^      ~~~
> 1 warning generated.

> Many other constructs in PostgreSQL are rejected by that switch,
> though, and I don't see a way to ask for just that one warning.

Yeah, -Wpedantic is a little *too* pedantic I'm afraid.  Oh well.

            regards, tom lane



pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgsql: Remove dependency on HeapTuple from predicate locking functions.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix dangling pointer in EvalPlanQual machinery.