Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGAaa-0003gX-6a for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2015 18:42:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZGAaZ-0005Fv-DQ for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jul 2015 18:42:27 +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 1ZGAZI-0003os-UZ for pgsql-hackers@postgresql.org; Fri, 17 Jul 2015 18:41:09 +0000 Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZGAZF-0007DR-D2 for pgsql-hackers@postgresql.org; Fri, 17 Jul 2015 18:41:07 +0000 Received: by lbbyj8 with SMTP id yj8so65897795lbb.0 for ; Fri, 17 Jul 2015 11:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:reply-to:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=0Cn3um+u1RWzZrIjo4a0TIvkpVazVr0ORU7GYwY12UY=; b=mxIM0xvHUYM5apmFP7qzFOWaivLjBLJsxUQJOSEvZkyowJlB2ddcSNjOZLKxAYPtVT uknjq9j36YLN8mfJf707wZ/BFrbtd/FXzUiBtKND68ET/uVHGiNg/+biu4ylrkvWZ5TB 3P9zw5lG7L2RiBHt3Ko3axKMEe0Vt9ki2ri6pV2WQsy9BSwc5OFwDZ9zkwlXoj991Dbt hQoSCildatlIv3etds1Z2j6lj/cTKDm5EorcdU2vOD9UAHBXv12zDn5bZZUE21Tj+eXX yvkz2uAe33EGLgTRFoi2Qq3680gKmMSssb8WugXWQxJ00h3pWZElJa8Efn6UF+Udw1jL bB5Q== X-Received: by 10.112.91.196 with SMTP id cg4mr15798463lbb.10.1437158464169; Fri, 17 Jul 2015 11:41:04 -0700 (PDT) Received: from [10.38.42.62] ([83.145.195.18]) by smtp.gmail.com with ESMTPSA id su8sm3019704lbc.41.2015.07.17.11.40.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jul 2015 11:41:03 -0700 (PDT) Message-ID: <55A94C2D.1010204@iki.fi> Date: Fri, 17 Jul 2015 21:40:45 +0300 From: Heikki Linnakangas Reply-To: hlinnaka@iki.fi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Michael Paquier , Kevin Grittner CC: "pgsql-hackers@postgresql.org" , Alvaro Herrera Subject: Re: [COMMITTERS] pgsql: Retain comments on indexes and constraints at ALTER TABLE ... TY References: <81620362.883169.1437142581761.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.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 07/17/2015 05:40 PM, Michael Paquier wrote: > On Fri, Jul 17, 2015 at 11:16 PM, Kevin Grittner wrote: >> Heikki Linnakangas wrote: >> >>> This fixes bug #13126, reported by Kirill Simonov. >> >> It looks like you missed something with the addition of >> AT_ReAddComment: >> >> test_ddl_deparse.c:80:11: warning: enumeration value 'AT_ReAddComment' not handled in switch [-Wswitch] >> switch (subcmd->subtype) >> ^ > > Oops. If someone could pick up the attached (backpatch to 9.5 needed)... 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. I couldn't quite figure out what the purpose of that module is, as there is no documentation or README or file-header comments on it. If it's there just to so you can run the regression tests that come with it, it might make sense to just add a "default" case to that switch to handle any unrecognized commands, and perhaps even remove the cases for the currently untested subcommands as it's just dead code. If it's supposed to act like a sample that you can copy-paste and modify, then perhaps that would still be the best option, and add a comment there explaining that it only cares about the most common subtypes but you can add handlers for others if necessary. Alvaro, you want to comment on that? - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers