Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gP75Q-0002KB-8J for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Nov 2018 14:33:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gP75O-0002vD-4P for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Nov 2018 14:33:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gP75N-0002tX-KB for pgsql-hackers@lists.postgresql.org; Tue, 20 Nov 2018 14:33:05 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gP75I-0005CE-Pg for pgsql-hackers@postgresql.org; Tue, 20 Nov 2018 14:33:04 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 4DA6321C7852; Tue, 20 Nov 2018 17:32:58 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.27.237] (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 175EC21C7851; Tue, 20 Nov 2018 17:32:58 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1542724378; bh=Pg8NPx3rs689lcrQQ81q3fni9mvLFcdOiy5ijVJJqQ4=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=Gw9SfpOXUps9VyzvL97u1YTx1g81cs5ZvnaXreubZ+QBSO2qukVqmGq35dHGHOak8 /GsZUH25tFQDDCICgtivFlR8nuOlY0ZenyI10uWvoxi7JkBoJiG5/omf3uCtDfLgvW kicQW/CPZPFKrzpeqpautvJr6E5F2/Ng5jFEBuR0= Subject: Re: Psql patch to show access methods info To: s.cherkashin@postgrespro.ru, Alvaro Herrera Cc: Michael Paquier , Nikita Glukhov , pgsql-hackers@postgresql.org References: <20181120104153.mgl5qy6uowryhesn@alvherre.pgsql> <64178681578cd2f1013db32bb7c00ddd@postgrespro.ru> From: Arthur Zakirov Message-ID: Date: Tue, 20 Nov 2018 17:32:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <64178681578cd2f1013db32bb7c00ddd@postgrespro.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, On 20.11.2018 16:08, s.cherkashin@postgrespro.ru wrote: > Ok, I fixed this. I looked at the patch. It is in good shape. It compiles and tests are passed. I have few a questions related with throwing errors. They might be silly :) \dAp as well as \dA command throw an error if a server's version below 9.6: "The server (version %s) does not support access methods" But other \dA commands don't. It seems that there is enough information in catalog for servers below 9.6. That is there are pg_am, pg_opfamily, pg_amop and other catalog tables related with access methods. \dAp calls pg_indexam_has_property() function, which doesn't exist in servers 9.5 and below. Is this the reason that it throws an error? If so then describeOneIndexColumnProperties() also should throw an error, because it calls pg_index_column_has_property() function, which doesn't exist in servers 9.5 and below. What do you think? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company