pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Jean-Marc Guazzo <jmguazzo@gmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-odbc@postgresql.org>
Subject: Re: Materialized Views
Date: Mon, 09 Nov 2015 14:10:16 +0200
Message-ID: <56408D28.5080203@iki.fi> (raw)
In-Reply-To: <CAJ3aXhoHD2=Tnz3VMvseegYAgYJOO6oGWObLAbC8EJh=jTOykw@mail.gmail.com>
References: <CAJ3aXhoNRbNLH8NqqNYVFNs-OO3c5DUTMXNJ9XDz_iQv=Gh6KA@mail.gmail.com>
	<CAB7nPqR-GrWWX-iu_xZ8ogNf=229s7B_Ox0y0GQHxsXVNM6g3w@mail.gmail.com>
	<55B094DD.1070803@iki.fi>
	<CAJ3aXhpmZ4wYZCqUGWHWE0ezp5=mhWRRRaju4y6FBJW+PTQ6oA@mail.gmail.com>
	<CAJ3aXhoHD2=Tnz3VMvseegYAgYJOO6oGWObLAbC8EJh=jTOykw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

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 <null pointer>
> SWORD                       -3
> WCHAR *             0x00000000 <null pointer>
> SWORD                       -3
> WCHAR *             0x00000000 <null pointer>
> 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_fn...

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



view thread (8+ messages)

Message-ID: <56408D28.5080203@iki.fi>
Permalink:  ../56408D28.5080203@iki.fi/
Also on:    postgresql.org/message-id/56408D28.5080203@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: hlinnaka@iki.fi, jmguazzo@gmail.com, michael.paquier@gmail.com
  Subject: Re: Materialized Views
  In-Reply-To: <56408D28.5080203@iki.fi>
  References: <CAJ3aXhoNRbNLH8NqqNYVFNs-OO3c5DUTMXNJ9XDz_iQv=Gh6KA@mail.gmail.com> <CAB7nPqR-GrWWX-iu_xZ8ogNf=229s7B_Ox0y0GQHxsXVNM6g3w@mail.gmail.com> <55B094DD.1070803@iki.fi> <CAJ3aXhpmZ4wYZCqUGWHWE0ezp5=mhWRRRaju4y6FBJW+PTQ6oA@mail.gmail.com> <CAJ3aXhoHD2=Tnz3VMvseegYAgYJOO6oGWObLAbC8EJh=jTOykw@mail.gmail.com> <56408D28.5080203@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox