Re: psql tab completion for updatable foreign tables

From: Samrat Revagade <revagade(dot)samrat(at)gmail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql tab completion for updatable foreign tables
Date: 2013-10-14 13:50:01
Message-ID: CAF8Q-Gw0haUA660cxZijE9Bkh2t-0iNd4ULFKRPExc5SdKfKiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 20, 2013 at 7:54 PM, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>wrote:

> On 20 September 2013 11:29, Samrat Revagade <revagade(dot)samrat(at)gmail(dot)com>
> wrote:
> >>
> >>
> >> > Okay, are you adding this to the september commitfest?
> >> >
> >>
> >> OK, I've done that. I think that it's too late for 9.3.
> >>
> >
> >
> > +1 for idea.
> >
> > I have tested patch and got surprising results with Cent-OS
> > Patch is working fine for Cent-OS 6.2 and RHEL 6.3
> > But is is giving problem on Cent-OS 6.3 (tab complete for local tables
> but
> > not for foreign tables)
> >
> > I have used following script:
> >
> > Two postgres servers are running by using ports 5432 and 5433.
> > Server with port 5432 has postgres_fdw installed and will interact with
> the
> > remote server running under port 5433.
> >
> > psql -p 5433 -c "CREATE TABLE aa_remote (a int, b int)" postgres
> > postgres=# CREATE EXTENSION postgres_fdw;
> > postgres=# CREATE SERVER postgres_server FOREIGN DATA WRAPPER
> postgres_fdw
> > OPTIONS (host 'localhost', port '5433', dbname 'postgres');
> > postgres=# CREATE USER MAPPING FOR PUBLIC SERVER postgres_server OPTIONS
> > (password '');
> > postgres=# CREATE FOREIGN TABLE aa_foreign (a int, b int) SERVER
> > postgres_server OPTIONS (table_name 'aa_remote');
> > postgres=# INSERT into aa_foreign values (1,2);
> >
> > But while doing any operation on aa_foreign tab do not complete on
> Cent-OS
> > 6.3 (tab complete for local tables but not for foreign tables)
> > Is that a problem ?
> >
>
> Hmm. It works for me. What does pg_relation_is_updatable() return for
> your foreign table?
>
>

Sorry .my environment has some problem. when I compiled it with fresh
installation of Cent-OS 6.3 it worked.
Patch :
1. Applies cleanly to git master
2. Has necessary source code comments
3. Follows coding standards
4. Solves use case.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-10-14 13:50:06 Re: removing old ports and architectures
Previous Message Robert Haas 2013-10-14 13:42:46 Re: removing old ports and architectures