Re: SQL/MED compatible connection manager

From: Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL/MED compatible connection manager
Date: 2008-10-31 15:49:14
Message-ID: 490B28FA.4080101@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
connection-manager-wip.patch.gz application/x-gzip 9.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2008-10-31 15:55:02 Mail troubles, stand by
Previous Message Joshua D. Drake 2008-10-31 15:45:50 Re: Enabling archive_mode without restart