Database Reference
In-Depth Information
1. First, create a foreign data wrapper called plproxy :
proxy1=# CREATE FOREIGN DATA WRAPPER
plproxy;
2. Then create an external server that defines both the connection options
and the partitions:
proxy1=# CREATE SERVER messaging
FOREIGN DATA WRAPPER plproxy
proxy1-# OPTIONS (connection_lifetime
'1800',
proxy1(# p0 'dbname=p0',
proxy1(# p1 'dbname=p1',
proxy1(# p2 'dbname=p2',
proxy1(# p3 'dbname=p3'
proxy1(# )
CREATE SERVER
3. Finally, grant usage on this server to either PUBLIC so all users can use
it:
proxy1=# CREATE USER MAPPING FOR PUBLIC
SERVER messaging;
CREATE USER MAPPING
Or, to some specific users or groups:
proxy1=# CREATE USER MAPPING FOR bob
SERVER messaging
proxy1-# OPTIONS (user 'plproxy',
password 'very.secret');
CREATE USER MAPPING
4. Then, grant usage on the cluster to the users who need to use it:
Search WWH ::




Custom Search