Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvlHg-0007In-9G for pgsql-odbc@arkaria.postgresql.org; Mon, 09 Nov 2015 12:10:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZvlHf-0003Vp-Rd for pgsql-odbc@arkaria.postgresql.org; Mon, 09 Nov 2015 12:10:51 +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 1ZvlHI-0002jf-9A for pgsql-odbc@postgresql.org; Mon, 09 Nov 2015 12:10:28 +0000 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZvlHB-0001X0-Ba for pgsql-odbc@postgresql.org; Mon, 09 Nov 2015 12:10:27 +0000 Received: by pasz6 with SMTP id z6so203787631pas.2 for ; Mon, 09 Nov 2015 04:10:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=cj5VvvFSA2ehPDLovQfCryrEaWGIGvSs4eM0WrMi5VI=; b=xqQ5OIn10EZqQM+pF432m8TrFCY0uLg0/A5fp21+UjZLug9dswx/RwZNt/8FT+tNuG K+abP0jMkN7ad/VuENnKpKdWWiEUmbPO2oOSsvTv9n7rimM/QUd5pCoSPPvtCJXdvevf HNKf2kpDn8YatPHy+zVBfzjUx7hEITGhYaHGj2J16CnejIr4u7y5VAGZmIJCVJ2h/JOG SUQ7SJXcJu6gLTbrGJGSLK5uFTuHa+TRTzjqi03pYvHdwum0KGZj5kiYWWDGBqrWpL8x fsBtwz54uj7tyUE4nJ+Y0gzy6YSEAAsF21cK4S4Lm3EQ9QE3ccUTdpsBC9nXCNi3QnQA tYXw== X-Received: by 10.68.131.201 with SMTP id oo9mr39747059pbb.74.1447071020244; Mon, 09 Nov 2015 04:10:20 -0800 (PST) Received: from [192.168.1.112] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id x15sm13232991pbt.38.2015.11.09.04.10.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 04:10:19 -0800 (PST) Message-ID: <56408D28.5080203@iki.fi> Date: Mon, 09 Nov 2015 14:10:16 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Jean-Marc Guazzo , Michael Paquier CC: PostgreSQL mailing lists Subject: Re: Materialized Views References: <55B094DD.1070803@iki.fi> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.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 Thanks for the testing! On 09/24/2015 06:51 PM, Jean-Marc Guazzo wrote: > Same test with Oracle Express 11g: > > create table login_test.test1 (id int primary key, contenu varchar(100)); > create materialized view login_test.test_vm as select * from login_test.tes > t1; > > MSQRY32 192c-1b0c ENTER SQLTablesW > HSTMT 0x00C6CBC0 > WCHAR * 0x00000000 > SWORD -3 > WCHAR * 0x00000000 > SWORD -3 > WCHAR * 0x00000000 > SWORD -3 > WCHAR * 0x00C6DDE0 [ 24] "'TABLE','VIEW','SYNONYM'" > SWORD 24 Hmm. I don't understand how to interpret this. If you create a materialized view on Oracle, and then call SQLTables(), what object type does it report the materialized view as? TABLE? Or VIEW? Or MATERIALIZED VIEW? > For DB2, I found this : > > *Valid table type identifiers can include: TABLE, VIEW, SYSTEM TABLE, > ALIAS, SYNONYM, GLOBAL TEMPORARY TABLE, AUXILIARY TABLE, MATERIALIZED QUERY > TABLE, or ACCEL-ONLY TABLE.* > src > https://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.odbc/src/tpc/db2z_fntables.dita Ok, so they use MATERIALIZED QUERY TABLE for the equivalent of our materialized views. What about foreign tables? Are they just TABLEs? > On a more rethorical pov,what's the difference between a materialized view > and a view for the end user behind ODBC ? Should there be one ? Well, depends on what the application is using the information for. If you just want to SELECT, there is no difference between a materialized view, a foreign table, a regular table or a regular view. But other operations are only applicable to certain kinds of object. For example, you cannot REINDEX a regular view or a foreign table, but a materialized view or a regular table you can. - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc