Re: [HACKERS] MERGE SQL Statement for PG11 - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: [HACKERS] MERGE SQL Statement for PG11
Date
Msg-id 1c708ad5-ab6d-da12-50d4-2d6fbff3c42e@sigaev.ru
Whole thread Raw
In response to Re: [HACKERS] MERGE SQL Statement for PG11  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Responses Re: [HACKERS] MERGE SQL Statement for PG11  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
> The variable would become unused in non-assert builds. I see that. But simply 
> removing it is not a solution and I don't think the code will compile that way. 
> We should either rewrite that assertion or put it inside a #ifdef 
> ASSERT_CHECKING block or simple remove that assertion because we already check 
> for relkind in parse_merge.c. Will check.
> 

That is noted by Kyotaro HORIGUCHI
https://www.postgresql.org/message-id/20180405.181730.125855581.horiguchi.kyotaro%40lab.ntt.co.jp

and his suggestion to use special macro looks better for me:
-   char        relkind;
+   char        relkind PG_USED_FOR_ASSERTS_ONLY;


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [PATCH] btree_gin, add support for uuid, bool, name, bpchar andanyrange types
Next
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] MERGE SQL Statement for PG11