Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 412D0161CA36 for ; Mon, 20 Feb 2012 12:32:44 -0400 (AST) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RzWAL-0007LW-8D for pgsql-bugs@postgresql.org; Mon, 20 Feb 2012 16:32:43 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RzWA7-0003YL-Ha for pgsql-bugs@postgresql.org; Mon, 20 Feb 2012 16:32:28 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1RzWA7-0007uS-0o for pgsql-bugs@postgresql.org; Mon, 20 Feb 2012 16:32:27 +0000 Date: Mon, 20 Feb 2012 16:32:27 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6478: Foreign tables not displayed To: pgsql-bugs@postgresql.org From: roman@chmela.sk X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/146 X-Sequence-Number: 32489 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 =3D c.relnamespace LEFT JOIN pg_tablespace t ON t.oid =3D c.reltablespace --WHERE c.relkind =3D 'r'::"char"; WHERE c.relkind in ('r'::"char",'f'::"char"); =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Thank you for response Regards Roman Chmela