Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 0531E161CA36 for ; Mon, 20 Feb 2012 16:19:45 -0400 (AST) Received: from sd-17937.dedibox.fr ([88.191.100.74]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RzZi2-0002pw-K9 for pgsql-bugs@postgresql.org; Mon, 20 Feb 2012 20:19:44 +0000 Received: from mail.lelarge.info (localhost.localdomain [127.0.0.1]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 0778F3B92D; Mon, 20 Feb 2012 21:19:30 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: Mon, 20 Feb 2012 21:19:29 +0100 From: Guillaume Lelarge To: Cc: Subject: Re: BUG #6478: Foreign tables not displayed In-Reply-To: References: Message-ID: <3b35c3d8363042dbb2e5ac2ba3564981@localhost> X-Sender: guillaume@lelarge.info User-Agent: RoundCube Webmail/0.4-beta X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/148 X-Sequence-Number: 32491 On Mon, 20 Feb 2012 16:32:27 +0000, roman@chmela.sk wrote: > The following bug has been logged on the website: > > Bug reference: 6478 > Logged by: Roman Chmela > Email address: roman@chmela.sk > PostgreSQL version: 9.1.2 > Operating system: 1) Windows 7 pro, 2) Ubuntu > Description: > > Hello > I have setup successfully foreign table, fully functional, retrieving data > from external csv file: > create extension file_fdw; > CREATE SERVER file_server FOREIGN DATA WRAPPER file_fdw; > > CREATE FOREIGN TABLE my_names ( > name text, > surname text > ) SERVER file_server > OPTIONS (format 'text', filename 'c:\xxx\my_names.csv', delimiter ';', null > ''); > > ----------------- > Problem: > ----------------- > - this table is not listed among tables (using pgadmin) > > ------------------- > Possible solution? > ------------------- > CREATE OR REPLACE VIEW pg_tables AS > SELECT n.nspname AS schemaname, c.relname AS tablename, > pg_get_userbyid(c.relowner) AS tableowner, t.spcname AS tablespace, > c.relhasindex AS hasindexes, c.relhasrules AS hasrules, c.relhastriggers AS > hastriggers > FROM pg_class c > LEFT JOIN pg_namespace n ON n.oid = c.relnamespace > LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace > --WHERE c.relkind = 'r'::"char"; > WHERE c.relkind in ('r'::"char",'f'::"char"); > Foreign tables have their own node. This node is not displayed by default. You need to go the preferences dialog, select the Browser tab, and check the "Foreign tables" checkbox. And reconnect to your server. That should display a new node with all foreign tables. BTW, if you find bugs or have issues with pgadmin, you shouldn't send them here. Use the pgadmin-support mailing list instead. -- Guillaume http://www.postgresql.fr http://dalibo.com