Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkZWB-0001kN-JI for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 13:46:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WkZWB-0004qS-1E for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 13:46:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkZW9-0004qJ-7n for pgsql-odbc@postgresql.org; Wed, 14 May 2014 13:46:45 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkZVz-00075s-8I for pgsql-odbc@postgresql.org; Wed, 14 May 2014 13:46:43 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 189C128473; Wed, 14 May 2014 06:46:31 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 10E5641DCB; Wed, 14 May 2014 06:46:31 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id EE4D6120030; Wed, 14 May 2014 06:46:36 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Wed, 14 May 2014 06:46:35 -0700 (PDT) Message-ID: <537373B4.20909@vmware.com> Date: Wed, 14 May 2014 16:46:28 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: Michael Paquier , Alvaro Herrera CC: PostgreSQL mailing lists Subject: Re: relkind check in info.c References: <20140318183906.GW6899@eldon.alvh.no-ip.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.6 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 03/19/2014 01:17 AM, Michael Paquier wrote: > On Wed, Mar 19, 2014 at 8:07 AM, Michael Paquier > wrote: >> On Wed, Mar 19, 2014 at 3:39 AM, Alvaro Herrera >> wrote: >>> Hi, >>> >>> I see that PGAPI_Tables() has a relkind check that only seems to include >>> tables and views. Does it make sense to have it consider materialized >>> views as well? >>> >>> I don't know anything about psqlodbc -- I'm just going by a question in >>> the spanish list: >>> http://www.postgresql.org/message-id/53287159.7040009@gmail.com >> >> Yeah, it would make sense to list it by adding 'm' to the relkind >> queries. I am noting as well that we should list it when invocating >> SQL_ALL_TABLE_TYPES. A patch to do that is simple, and not worth an >> additional regression test IMO, just to avoid the pain to have >> version-related regression tests... > Just adding that a similar thing should be done with foreign tables. We need to decide to what to return in the table_type column for them. "FOREIGN TABLE" and "MATERIALIZED VIEW" would be natural choices. But it would be good to return the same string that other DBMS's return for those things. What does SQL Server's driver return for materialized views? I'm not aware of any other DBMS that implements foreign tables per the spec, but e.g DB2 has "remote tables" and Oracle has "database links", which are similar features. I wonder what table type do they return. - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc