Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 599251BB4C01 for ; Mon, 9 Jan 2012 18:56:13 -0400 (AST) Received: from news.hub.org ([200.46.204.72]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RkO8P-0000T0-2Z for pgsql-jdbc@postgresql.org; Mon, 09 Jan 2012 22:56:13 +0000 Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id q09MtqlE086105 for ; Mon, 9 Jan 2012 18:55:52 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id q09MtIZp085728 for pgsql-jdbc@postgresql.org; Mon, 9 Jan 2012 18:55:18 -0400 (AST) (envelope-from news) From: Joseph Shraibman X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: problem: query result in jdbc is <> result in psql Date: Mon, 09 Jan 2012 17:55:18 -0500 Organization: Hub.Org Networking Services Lines: 12 Message-ID: References: <4F0B228E.8060708@selectacast.net> <4F0B2B5E.8030703@selectacast.net> <4F0B6FBF.5050703@selectacast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 In-Reply-To: <4F0B6FBF.5050703@selectacast.net> To: pgsql-jdbc@postgresql.org X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/38 X-Sequence-Number: 22578 On 01/09/2012 05:52 PM, Joseph Shraibman wrote: > On 01/09/2012 01:44 PM, Dave Cramer wrote: >> OK, tried with 9.1.2 still can't replicate this problem. >> > Found the problem. When connecting with jdbc I was connecting to > template1, when connecting with psql I was connecting to a different > database. When connecting to template1 I can't view the relname from the > other database, even though its the same user. > The problem being that when I'm connected to a different database selecting on pg_catalog in my database isn't going to give me the correct result.