Accessing dblink without using username and Password

Поиск
Список
Период
Сортировка
От Daulat
Тема Accessing dblink without using username and Password
Дата
Msg-id CALfOM6LCyuMP5wHpt65WxK2A7WqH09JYwGXgx_hGtVa-AuBJKA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Accessing dblink without using username and Password  (Holger Jakobs <holger@jakobs.com>)
Список pgsql-admin
Hello Team,

I need to know how we can access table data from a locally or remote database using dblink and without giving username and password.
In the hba.conf file, md5 is allowed for all connections.

It looks like we can do this approach using superuser but not from the normal users. 

Here, I have tried to access the data of one table from a database created locally.

[postgres@ip-172-31-32-99 bin]$ ./psql -d Performance_DB_104_28MAR21 -U trumos
psql (10.2)
Type "help" for help.

Performance_DB_104_28MAR21=> show search_path;
   search_path
-----------------
 "$user", public
(1 row)
 

Performance_DB_104_28MAR21=> SELECT * FROM ucf.dblink('dbname=DemoDB','SELECT processstatusid,createdby FROM  ucf.ucf_processstatus') AS t1 (processstatusid integer, createdby integer);
ERROR:  password is required
DETAIL:  Non-superusers must provide a password in the connection string.
Performance_DB_104_28MAR21=>

Please suggest !

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore with --use-list and --jobs and depdendencies
Следующее
От: Holger Jakobs
Дата:
Сообщение: Re: Accessing dblink without using username and Password