From: Pavel Stehule on
Hello

I see a SQL/MED security very unclean - it have to be very vell documented :(

I have a database on port 5401. With user Tom - it require a password

[pavel(a)nemesis pgsql]$ psql-dev1 postgres -U tom
Password for user tom:
Timing is on.
psql-dev1 (9.0devel)
Type "help" for help.

postgres=>

I can't to do selects to table from this database as some non superuser

create foreign table test_table(id numeric) server dev1;

postgres=# create user mapping for public server dev1;
CREATE USER MAPPING
Time: 2,507 ms
postgres=# select count(*) from test_table;
count
---------
1000002
(1 row)

postgres=# create user mapping for tom server dev1 options (user
'tom', password 'tom');
CREATE USER MAPPING
Time: 32,929 ms
postgres=# set role to tom;
SET
Time: 0,450 ms
postgres=> select * from test_table;
ERROR: password is required
DETAIL: Non-superuser cannot connect if the server does not request a password.
HINT: Target server's authentication method must be changed.

What I doing wrong?

Regards
Pavel Stehule

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers