Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZwAcS-0003Cv-MH for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Nov 2015 15:14:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZwAcS-0006fJ-8k for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Nov 2015 15:14:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZwAbp-0005XF-Oh for pgsql-bugs@postgresql.org; Tue, 10 Nov 2015 15:13:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZwAbn-0001j1-I0 for pgsql-bugs@postgresql.org; Tue, 10 Nov 2015 15:13:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id tAAFDBSs002924; Tue, 10 Nov 2015 10:13:11 -0500 From: Tom Lane To: rucsoftsec@163.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13764: function ghstore_consistent() returns a wrong value if var "strategy" contains an unsupported number In-reply-to: <20151110030730.2573.7699@wrigleys.postgresql.org> References: <20151110030730.2573.7699@wrigleys.postgresql.org> Comments: In-reply-to rucsoftsec@163.com message dated "Tue, 10 Nov 2015 03:07:30 +0000" Date: Tue, 10 Nov 2015 10:13:11 -0500 Message-ID: <2923.1447168391@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org rucsoftsec@163.com writes: > function ghstore_consistent() computes the consistency and return a bool > value. It first computes the value of variable "strategy". It second > executes different branches of the code depending of different value of > variable "straregy". When the value of variable"strategy" is an unsupported > strategy number, function ghstore_consistent() will executes the code in > line 584. It means function ghstore_consistent() fails, but the value of > variable "res" is "true" which will be returned in line 586. Therefore, does > it need to assign "false" to variable "res" after line 584? No, because elog(ERROR) doesn't return. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs