pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedMaterialized Views
8+ messages / 3 participants
[nested] [flat]
* Materialized Views
@ 2015-07-23 02:05 Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Jean-Marc Guazzo @ 2015-07-23 02:05 UTC (permalink / raw)
To: pgsql-odbc
Hi,
Materialized Views aren't visible when I try to link them with MS Access,
MS Excel or LibreOffice Base.
I guess that's because the ODBC driver doesn't return this information...
Can you tell me whether there will be some adjustement in the next version
of the odbc driver regarding the MVs ?
Thanks.
JM.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Materialized Views
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
@ 2015-07-23 02:37 ` Michael Paquier <michael.paquier@gmail.com>
2015-07-23 03:55 ` Re: Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 07:16 ` Re: Materialized Views Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 2 replies; 8+ messages in thread
From: Michael Paquier @ 2015-07-23 02:37 UTC (permalink / raw)
To: Jean-Marc Guazzo <jmguazzo@gmail.com>; +Cc: pgsql-odbc
On Thu, Jul 23, 2015 at 11:05 AM, Jean-Marc Guazzo <jmguazzo@gmail.com> wrote:
> Materialized Views aren't visible when I try to link them with MS Access, MS
> Excel or LibreOffice Base.
There is the same problem with foreign tables actually.
> I guess that's because the ODBC driver doesn't return this information...
>
> Can you tell me whether there will be some adjustement in the next version
> of the odbc driver regarding the MVs ?
Hard to say... The following patch is not loved enough I am afraid:
http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail....
--
Michael
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Materialized Views
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
@ 2015-07-23 03:55 ` Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 03:57 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: Jean-Marc Guazzo @ 2015-07-23 03:55 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc
What must be done to show some love for this patch ?
JM.
Le mer. 22 juil. 2015 à 22:37, Michael Paquier <michael.paquier@gmail.com>
a écrit :
> On Thu, Jul 23, 2015 at 11:05 AM, Jean-Marc Guazzo <jmguazzo@gmail.com>
> wrote:
> > Materialized Views aren't visible when I try to link them with MS
> Access, MS
> > Excel or LibreOffice Base.
>
> There is the same problem with foreign tables actually.
>
> > I guess that's because the ODBC driver doesn't return this information...
> >
> > Can you tell me whether there will be some adjustement in the next
> version
> > of the odbc driver regarding the MVs ?
>
> Hard to say... The following patch is not loved enough I am afraid:
>
> http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail....
> --
> Michael
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Materialized Views
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
2015-07-23 03:55 ` Re: Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
@ 2015-07-23 03:57 ` Michael Paquier <michael.paquier@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: Michael Paquier @ 2015-07-23 03:57 UTC (permalink / raw)
To: Jean-Marc Guazzo <jmguazzo@gmail.com>; +Cc: pgsql-odbc
On Thu, Jul 23, 2015 at 12:55 PM, Jean-Marc Guazzo <jmguazzo@gmail.com> wrote:
> What must be done to show some love for this patch ?
A review would help, as well as finding a good bait to catch some
committer's time.
--
Michael
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Materialized Views
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
@ 2015-07-23 07:16 ` Heikki Linnakangas <hlinnaka@iki.fi>
2015-07-23 16:05 ` Re: Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: Heikki Linnakangas @ 2015-07-23 07:16 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; Jean-Marc Guazzo <jmguazzo@gmail.com>; +Cc: pgsql-odbc
On 07/23/2015 05:37 AM, Michael Paquier wrote:
> On Thu, Jul 23, 2015 at 11:05 AM, Jean-Marc Guazzo <jmguazzo@gmail.com> wrote:
>> Materialized Views aren't visible when I try to link them with MS Access, MS
>> Excel or LibreOffice Base.
>
> There is the same problem with foreign tables actually.
>
>> I guess that's because the ODBC driver doesn't return this information...
>>
>> Can you tell me whether there will be some adjustement in the next version
>> of the odbc driver regarding the MVs ?
>
> Hard to say... The following patch is not loved enough I am afraid:
> http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail....
Ah, that patch. No-one investigated what e.g. SQL Server returns in the
table type column for materialized views. Or what DB2 returns for
federated tables. While the specification gives us free hands to return
an implementation-specific string, it'd be good to use what the other
DBMS's use.
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Materialized Views
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
2015-07-23 07:16 ` Re: Materialized Views Heikki Linnakangas <hlinnaka@iki.fi>
@ 2015-07-23 16:05 ` Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-09-24 15:51 ` Re: Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Jean-Marc Guazzo @ 2015-07-23 16:05 UTC (permalink / raw)
To: hlinnaka@iki.fi, Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc
Well, I made a test by creating a 'indexed view' in sql server which is
supposed to be the same as a materialized view. (
http://stackoverflow.com/questions/3986366/how-to-create-materialized-views-in-sql-server
)
On a SQL server DB, I created the following items
create table sample_table( id int identity primary key, value varchar(100));
create view sample_ix_view WITH SCHEMABINDING as select id,value from
dbo.sample_table;
create unique clustered index ix_sample_ix_view on dbo.sample_ix_view(id);
I activated ODBC trace log and opened it with Access.
Excerpt from this trace :
MSACCESS 2728-410 ENTER SQLTablesW
...
WCHAR * 0x67DFBBA0 [ -3] "'TABLE','VIEW','SYSTEM
TABLE','ALIAS','SYNONYM'\ 0"
...
MSACCESS 2728-410 EXIT SQLTablesW with return code 0 (SQL_SUCCESS)
...
WCHAR * 0x67DFBBA0 [ -3] "'TABLE','VIEW','SYSTEM
TABLE','ALIAS','SYNONYM'\ 0"
...
MSACCESS 2728-410 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
...
PTR 0x00717C34 [ 24] "sample_table"
...
MSACCESS 2728-410 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
...
PTR 0x00717B28 [ 10] "TABLE"
...
MSACCESS 2728-410 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
...
PTR 0x00717C34 [ 28] "sample_ix_view"
...
MSACCESS 2728-410 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
...
PTR 0x00717B28 [ 8] "VIEW"
...
JM.
Le jeu. 23 juil. 2015 à 03:16, Heikki Linnakangas <hlinnaka@iki.fi> a
écrit :
> On 07/23/2015 05:37 AM, Michael Paquier wrote:
> > On Thu, Jul 23, 2015 at 11:05 AM, Jean-Marc Guazzo <jmguazzo@gmail.com>
> wrote:
> >> Materialized Views aren't visible when I try to link them with MS
> Access, MS
> >> Excel or LibreOffice Base.
> >
> > There is the same problem with foreign tables actually.
> >
> >> I guess that's because the ODBC driver doesn't return this
> information...
> >>
> >> Can you tell me whether there will be some adjustement in the next
> version
> >> of the odbc driver regarding the MVs ?
> >
> > Hard to say... The following patch is not loved enough I am afraid:
> >
> http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail....
>
> Ah, that patch. No-one investigated what e.g. SQL Server returns in the
> table type column for materialized views. Or what DB2 returns for
> federated tables. While the specification gives us free hands to return
> an implementation-specific string, it'd be good to use what the other
> DBMS's use.
>
> - Heikki
>
>
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Attachments:
SQL.odbctrace.zip (application/x-zip-compressed, 20.4K) download
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Materialized Views
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
2015-07-23 07:16 ` Re: Materialized Views Heikki Linnakangas <hlinnaka@iki.fi>
2015-07-23 16:05 ` Re: Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
@ 2015-09-24 15:51 ` Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-11-09 12:10 ` Re: Materialized Views Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 1 reply; 8+ messages in thread
From: Jean-Marc Guazzo @ 2015-09-24 15:51 UTC (permalink / raw)
To: hlinnaka@iki.fi, Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc
Hi,
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
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...
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 ?
JM.
Le jeu. 23 juil. 2015 à 12:05, Jean-Marc Guazzo <jmguazzo@gmail.com> a
écrit :
> Well, I made a test by creating a 'indexed view' in sql server which is
> supposed to be the same as a materialized view. (
> http://stackoverflow.com/questions/3986366/how-to-create-materialized-views-in-sql-server
> )
>
>
> On a SQL server DB, I created the following items
>
> create table sample_table( id int identity primary key, value
> varchar(100));
> create view sample_ix_view WITH SCHEMABINDING as select id,value from
> dbo.sample_table;
> create unique clustered index ix_sample_ix_view on dbo.sample_ix_view(id);
>
>
> I activated ODBC trace log and opened it with Access.
>
> Excerpt from this trace :
>
> MSACCESS 2728-410 ENTER SQLTablesW
> ...
> WCHAR * 0x67DFBBA0 [ -3] "'TABLE','VIEW','SYSTEM
> TABLE','ALIAS','SYNONYM'\ 0"
> ...
> MSACCESS 2728-410 EXIT SQLTablesW with return code 0
> (SQL_SUCCESS)
> ...
> WCHAR * 0x67DFBBA0 [ -3] "'TABLE','VIEW','SYSTEM
> TABLE','ALIAS','SYNONYM'\ 0"
> ...
> MSACCESS 2728-410 EXIT SQLGetData with return code 0
> (SQL_SUCCESS)
> ...
> PTR 0x00717C34 [ 24] "sample_table"
> ...
> MSACCESS 2728-410 EXIT SQLGetData with return code 0
> (SQL_SUCCESS)
> ...
> PTR 0x00717B28 [ 10] "TABLE"
> ...
> MSACCESS 2728-410 EXIT SQLGetData with return code 0
> (SQL_SUCCESS)
> ...
> PTR 0x00717C34 [ 28] "sample_ix_view"
> ...
> MSACCESS 2728-410 EXIT SQLGetData with return code 0
> (SQL_SUCCESS)
> ...
> PTR 0x00717B28 [ 8] "VIEW"
> ...
>
>
>
> JM.
>
>
>
> Le jeu. 23 juil. 2015 à 03:16, Heikki Linnakangas <hlinnaka@iki.fi> a
> écrit :
>
>> On 07/23/2015 05:37 AM, Michael Paquier wrote:
>> > On Thu, Jul 23, 2015 at 11:05 AM, Jean-Marc Guazzo <jmguazzo@gmail.com>
>> wrote:
>> >> Materialized Views aren't visible when I try to link them with MS
>> Access, MS
>> >> Excel or LibreOffice Base.
>> >
>> > There is the same problem with foreign tables actually.
>> >
>> >> I guess that's because the ODBC driver doesn't return this
>> information...
>> >>
>> >> Can you tell me whether there will be some adjustement in the next
>> version
>> >> of the odbc driver regarding the MVs ?
>> >
>> > Hard to say... The following patch is not loved enough I am afraid:
>> >
>> http://www.postgresql.org/message-id/CAB7nPqR0apHpiPAi4J2e3oR2jZ8MREyJAzxdWMjrr4h5PsRp4w@mail.gmail....
>>
>> Ah, that patch. No-one investigated what e.g. SQL Server returns in the
>> table type column for materialized views. Or what DB2 returns for
>> federated tables. While the specification gives us free hands to return
>> an implementation-specific string, it'd be good to use what the other
>> DBMS's use.
>>
>> - Heikki
>>
>>
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Attachments:
odbctrace_oracle.zip (application/x-zip-compressed, 5.6K) download
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Materialized Views
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Re: Materialized Views Michael Paquier <michael.paquier@gmail.com>
2015-07-23 07:16 ` Re: Materialized Views Heikki Linnakangas <hlinnaka@iki.fi>
2015-07-23 16:05 ` Re: Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-09-24 15:51 ` Re: Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
@ 2015-11-09 12:10 ` Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 0 replies; 8+ messages in thread
From: Heikki Linnakangas @ 2015-11-09 12:10 UTC (permalink / raw)
To: Jean-Marc Guazzo <jmguazzo@gmail.com>; Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-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
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2015-11-09 12:10 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23 02:05 Materialized Views Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 02:37 ` Michael Paquier <michael.paquier@gmail.com>
2015-07-23 03:55 ` Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-07-23 03:57 ` Michael Paquier <michael.paquier@gmail.com>
2015-07-23 07:16 ` Heikki Linnakangas <hlinnaka@iki.fi>
2015-07-23 16:05 ` Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-09-24 15:51 ` Jean-Marc Guazzo <jmguazzo@gmail.com>
2015-11-09 12:10 ` Heikki Linnakangas <hlinnaka@iki.fi>
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