Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZH7gD-0007vD-4Z for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2015 09:48:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZH7gB-00011K-OO for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2015 09:48:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZH7eu-0007zU-Ux for pgsql-hackers@postgresql.org; Mon, 20 Jul 2015 09:46:53 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZH7es-0001uq-4s for pgsql-hackers@postgresql.org; Mon, 20 Jul 2015 09:46:52 +0000 Received: from intern.anarazel.de (p5DDC745F.dip0.t-ipconnect.de [93.220.116.95]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 39999860001; Mon, 20 Jul 2015 11:46:49 +0200 (CEST) Date: Mon, 20 Jul 2015 11:46:47 +0200 From: Andres Freund To: Heikki Linnakangas Cc: Michael Paquier , Kevin Grittner , "pgsql-hackers@postgresql.org" , Alvaro Herrera Subject: Re: Re: [COMMITTERS] pgsql: Retain comments on indexes and constraints at ALTER TABLE ... TY Message-ID: <20150720094647.GX5520@alap3.anarazel.de> References: <81620362.883169.1437142581761.JavaMail.yahoo@mail.yahoo.com> <55A94C2D.1010204@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55A94C2D.1010204@iki.fi> X-Pg-Spam-Score: -5.4 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2015-07-17 21:40:45 +0300, Heikki Linnakangas wrote: > Hmm, that function is pretty fragile, it will segfault on any AT_* type that > it doesn't recognize. Thankfully you get that compiler warning, but we have > added AT_* type codes before in minor releases. For in-core code that is supposed to handle all cases I find it much better to get a compiler warning than to error out in a default: case. The latter is very likely not going to be exercised by any test and thus not be noticed for prolonged time. Might make sense to test for -Werror=switch and add that to the compiler flags by default. Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers