Re: SQL/MED compatible connection manager - Mailing list pgsql-hackers

From Martin Pihlak
Subject Re: SQL/MED compatible connection manager
Date
Msg-id 490B28FA.4080101@gmail.com
Whole thread Raw
In response to Re: SQL/MED compatible connection manager  (Martin Pihlak <martin.pihlak@gmail.com>)
Responses Re: SQL/MED compatible connection manager
List pgsql-hackers
Here is an updated patch. I'm also submitting this to November Commitfest -
I believe it is possible to get this into shape for 8.4. This is still a WIP
but I really need a review before moving on with the syntax, pg_dump support
etc.

Currently the system catalogs and user accessible connection lookup function
have been implemented. Ships with 2 FOREIGN DATA WRAPPERS -- dummy and pgsql.
It is possible to define connections by inserting directly into the catalogs:

insert into pg_catalog.pg_foreign_server
    select 'foo', 2200, 10, oid, null,
            '{host=/tmp,port=6543,dbname=foo}'::text[]
    from     pg_foreign_data_wrapper
    where     fdwname='default';

insert into pg_catalog.pg_foreign_user_mapping
    select    10, oid, '{user=bob,password=secret}'::text[]
    from     pg_foreign_server
    where     srvname='foo' ;

select * from pg_get_remote_connection_info('foo');

  option  | value
----------+--------
 host     | /tmp
 port     | 6543
 dbname   | foo
 user     | bob
 password | secret
(5 rows)

regards,
Martin


Attachment

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Enabling archive_mode without restart
Next
From: "Josh Berkus"
Date:
Subject: Mail troubles, stand by