Re: [HACKERS] problem permission on view

2004-09-17 Thread Gaetano Mendola
Andreas Pflug wrote: Gaetano Mendola wrote: I'd like to fix this by myself but for lack of time and lack of postgres code knowledge I'm stuck. What you want is CREATE VIEW foo AS SELECT p1, p2, bar('theValidParameter') as p3 FROM othertab; GRANT ALL ON TABLE foo TO public; and don't want to gr

Re: [HACKERS] problem permission on view

2004-09-17 Thread Andreas Pflug
Gaetano Mendola wrote: I'd like to fix this by myself but for lack of time and lack of postgres code knowledge I'm stuck. What you want is CREATE VIEW foo AS SELECT p1, p2, bar('theValidParameter') as p3 FROM othertab; GRANT ALL ON TABLE foo TO public; and don't want to grant execute on bar() t

Re: [HACKERS] problem permission on view

2004-09-17 Thread Gaetano Mendola
Tom Lane wrote: Josh Berkus <[EMAIL PROTECTED]> writes: As said, I discussed this with Gaetano on IRC, and am not sure why things are set up the way they are.If a user has permission on a view, shouldn't that include permission on any functions executed by the view?If not, why not? See pr

Re: [HACKERS] problem permission on view

2004-09-17 Thread Andreas Pflug
Gaetano Mendola wrote: Hi all, I'm having some problem with permissions on views, I spoke with Josh on IRC about it and I'm reposting it: I found a not simmetrical behavior about permission on views and functions. Let me explain: If I use the view/table T inside the view V, is enough give the sele

Re: [HACKERS] problem permission on view

2004-09-16 Thread Tom Lane
Josh Berkus <[EMAIL PROTECTED]> writes: > As said, I discussed this with Gaetano on IRC, and am not sure why things are > set up the way they are.If a user has permission on a view, shouldn't > that include permission on any functions executed by the view?If not, why > not? See prior disc

Re: [HACKERS] problem permission on view

2004-09-16 Thread Greg Stark
Josh Berkus <[EMAIL PROTECTED]> writes: > As said, I discussed this with Gaetano on IRC, and am not sure why things are > set up the way they are.If a user has permission on a view, shouldn't > that include permission on any functions executed by the view?If not, why > not? Then all s

Re: [HACKERS] problem permission on view

2004-09-16 Thread Josh Berkus
Folks, > If the view V use a function F. > > In this last case is not enough have the select permisson on V but I have > to give also the Execution permission on F!!! As said, I discussed this with Gaetano on IRC, and am not sure why things are set up the way they are.If a user has permissio

[HACKERS] problem permission on view

2004-09-16 Thread Gaetano Mendola
Hi all, I'm having some problem with permissions on views, I spoke with Josh on IRC about it and I'm reposting it: I found a not simmetrical behavior about permission on views and functions. Let me explain: If I use the view/table T inside the view V, is enough give the select permission on view V