José Luis Castro a écrit :
> Sorry, Jean-Yves: I have no idea how to do that. Is it necessary? Or -better
> answered- when is necessary to declare a "search_path" variable?
> Thaks for your help.

search_path is a system variable, unique for each role.

command to see what's going on is: 
show search-path;
default path is: "$user",public"
this command can be issued by a regular user.

however, if you happen to create new schemas, only the postgres user has
total control of it (ONLY with qualified table's name if you don't update
the postgres SU search_path variable, such as: schema2.table5), for a user,
you must inclued the new schema in its search_path otherwise he'll see the
schema but won't be able to access what's in it.
(this not exactly true, as it depend on the permissions you're gonna GRANT to 
him,
but until you haven't got further, this would be a loss of time)

permanent alteration can be done by postgres user as:
ALTER USER mybeloveduserthatilovesomuch SET search_path TO 
schema1,schema2,schema3.......;

This is a very important command as most of the time you suppress any
rights from the public schema (WARNING: there's a 'public' ROLE AND a 'public' 
SCHEMA!!!)
in order to gain the possibility to enable/disable the CONNECT possibility
for any user that must have access to this DB (and also other type of access).

This also gives the user the possibility to retrieve rows from a table that is 
listed
into its search_path.


Things are a tiny bit more complicated, but this should do.

JY
-- 
Q:      How many Democrats does it take to enjoy a good joke?
A:      One more than you can find.

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to