Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7F7181337B5C for ; Tue, 30 Nov 2010 10:17:51 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 87076-06 for ; Tue, 30 Nov 2010 14:17:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id 29F121337B4F for ; Tue, 30 Nov 2010 10:17:41 -0400 (AST) Received: (qmail 28768 invoked by uid 512); 30 Nov 2010 14:17:39 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 30 Nov 2010 14:17:39 -0000 Received: from unknown (HELO ?192.168.24.51?) (183.76.21.68) by sd.tpf.co.jp with SMTP; 30 Nov 2010 14:17:39 -0000 Message-ID: <4CF5077A.2050906@tpf.co.jp> Date: Tue, 30 Nov 2010 23:17:30 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: michael.28.smith@bt.com CC: pgsql-odbc@postgresql.org, stephen.hindmarch@bt.com Subject: Re: Issues when using schema names with odbc References: <806CB309AA19EE4F8F30EB5DF3E372B33B41580830@EMV61-UKRD.domain1.systemhost.net> <4CE7335D.7080407@tpf.co.jp> <806CB309AA19EE4F8F30EB5DF3E372B33B5E635C22@EMV61-UKRD.domain1.systemhost.net> In-Reply-To: <806CB309AA19EE4F8F30EB5DF3E372B33B5E635C22@EMV61-UKRD.domain1.systemhost.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.242 tagged_above=-10 required=5 tests=BAYES_00=-1.9, DNS_FROM_RFC_BOGUSMX=1.668, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/36 X-Sequence-Number: 10521 (2010/11/29 23:51), michael.28.smith@bt.com wrote: > Used a little test app to verify this and I get different results, > > Assuming create schema test_schema; > > create table public.test( > row1 int, > row2 text); > > create table test_schema.test( > row_t_1 int, > row_t_2 text); > > grant usage on schema test_schema to public; > grant select on public.test to public; > grant select on test_schema.test to public; > > insert into public.test values (1,'public schema'); > insert into test_schema.test values (2,'test schema'); > > The test app shows the following results....: > > [root@winston scripts]# ./sqltest > SQLColumns Connection Test > Handles Allocated > > Getting columns from test_schema.test > No data! > > Getting all rows from test_schema.test > Row 0:1=2;2=test schema; > > Getting columns from public.test > No data! > > Getting all rows from public.test > Row 0:1=1;2=public schema; > > Getting columns from (null).test > Column 0: row > Column 1: row > Column 2: row > Column 3: row > > Getting all rows from (null).test > Row 0:1=1;2=public schema; Which version of psqlodbc driver are you using? Here I get the following results. Getting columns from test_schema.test Column 0: row_t_1 Column 1: row_t_2 Getting all rows from test_schema.test Row 0:1=2;2=test schema; Getting columns from public.test Column 0: row1 Column 1: row2 Getting all rows from public.test Row 0:1=1;2=public schema; Getting columns from (null).test Column 0: row1 Column 1: row2 Getting all rows from (null).test Row 0:1=1;2=public schema; regards, Hiroshi Inoue