Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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 !


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group