pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: roman@chmela.sk
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6478: Foreign tables not displayed
Date: Mon, 20 Feb 2012 21:19:29 +0100
Message-ID: <3b35c3d8363042dbb2e5ac2ba3564981@localhost> (raw)
In-Reply-To: <E1RzWA7-0007uS-0o@wrigleys.postgresql.org>
References: <E1RzWA7-0007uS-0o@wrigleys.postgresql.org>

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



view thread (2+ messages)

Message-ID: <3b35c3d8363042dbb2e5ac2ba3564981@localhost>
Permalink:  ../3b35c3d8363042dbb2e5ac2ba3564981@localhost/
Also on:    postgresql.org/message-id/3b35c3d8363042dbb2e5ac2ba3564981@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: guillaume@lelarge.info, roman@chmela.sk
  Subject: Re: BUG #6478: Foreign tables not displayed
  In-Reply-To: <3b35c3d8363042dbb2e5ac2ba3564981@localhost>
  References: <E1RzWA7-0007uS-0o@wrigleys.postgresql.org> <3b35c3d8363042dbb2e5ac2ba3564981@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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