Re: User Privileges using dblink

From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: User Privileges using dblink
Date: 2004-06-29 18:11:08
Message-ID: 008201c45e04$8b938ec0$1e82bfd5@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> create view myinst as select * from dblink('dbname=sva4_int1','select ....
> from inst') as (.......);
>
> The view connect not to a remote database. It uses the local database.
> You can read the data from table inst without any restrictions! (Select *
> from myinst ...)
> This problem could also be resolved, if dblink uses the current login
> information.

I'm sorry but I forgot to comment on this. Isn't this because Your
configuration alows trusted connections for localhost ?
This is the part of pg_hba.conf comment:

# Put your actual configuration here
# ----------------------------------
#
# CAUTION: The default configuration allows any local user to connect
# using any PostgreSQL user name, including the superuser, over either
# Unix-domain sockets or TCP/IP. If you are on a multiple-user
# machine, the default configuration is probably too liberal for you.
# Change it to use something other than "trust" authentication.
#
# If you want to allow non-local connections, you need to add more
# "host" records. Also, remember TCP/IP connections are only enabled
# if you enable "tcpip_socket" in postgresql.conf.

Regards !

Browse pgsql-hackers by date

  From Date Subject
Next Message Darko Prenosil 2004-06-29 19:04:26 Re: INSERT rule
Previous Message Darko Prenosil 2004-06-29 17:37:57 Re: User Privileges using dblink