Re: [HACKERS] search_path improvements

2009-06-01 Thread Robert Haas
On Mon, Jun 1, 2009 at 3:27 PM, Sam Mason wrote: > On Mon, Jun 01, 2009 at 08:05:33PM +0100, Greg Stark wrote: >> As I said earlier I doubt "pop" or "delete" is ever going to actually >> be what you want. I suspect you're far more likely to want to restore >> it to what it was before you started a

Re: [HACKERS] search_path improvements

2009-06-01 Thread Sam Mason
On Mon, Jun 01, 2009 at 08:05:33PM +0100, Greg Stark wrote: > As I said earlier I doubt "pop" or "delete" is ever going to actually > be what you want. I suspect you're far more likely to want to restore > it to what it was before you started altering it. > > As support I'll point out this is what

Re: [HACKERS] search_path improvements

2009-06-01 Thread Greg Stark
On Mon, Jun 1, 2009 at 7:57 PM, Alvaro Herrera wrote: > Josh Berkus wrote: > >>> Well I don't mind push but I still think pop is an error. What you >>> really want to do is restore it to the value you started with. You >>> don't want to remove the last element since that may not be the >>> element

Re: [HACKERS] search_path improvements

2009-06-01 Thread Alvaro Herrera
Josh Berkus wrote: >> Well I don't mind push but I still think pop is an error. What you >> really want to do is restore it to the value you started with. You >> don't want to remove the last element since that may not be the >> element you added. Some function you called may have added an extra >

Re: [HACKERS] search_path improvements

2009-06-01 Thread Josh Berkus
Greg, Well the goal is to make them simpler. I don't know any language that has implemented what you describe. Either you have access to the internal methods of a class or you don't and you only have access to the public api. That seems to work for much more sophisticated languages than ours jus

Re: [HACKERS] search_path improvements

2009-05-31 Thread David E. Wheeler
On May 31, 2009, at 3:47 PM, Greg Stark wrote: On Sun, May 31, 2009 at 9:12 PM, Josh Berkus wrote: This assumes that all users should have access to the same public APIs as all other users. Real applications are more complex. Well the goal is to make them simpler. I don't know any langua

Re: [HACKERS] search_path improvements

2009-05-31 Thread Greg Stark
On Sun, May 31, 2009 at 9:12 PM, Josh Berkus wrote: > This assumes that all users should have access to the same public APIs as > all other users.  Real applications are more complex. Well the goal is to make them simpler. I don't know any language that has implemented what you describe. Either y

Re: [HACKERS] search_path improvements

2009-05-31 Thread Josh Berkus
Greg, What's the point of "namespaces" if not to implement visibility? The interesting thing to do would be to hide all the internal foo functions in a foo.* schema and only put the external api in public. That is an interesting idea. However, what our real users are really doing in the fiel

Re: [HACKERS] search_path improvements WAS: search_path vs extensions

2009-05-29 Thread David E. Wheeler
On May 29, 2009, at 5:16 PM, Greg Stark wrote: On Fri, May 29, 2009 at 11:03 PM, David E. Wheeler > wrote: On May 29, 2009, at 2:52 PM, Josh Berkus wrote: a) the ability to "push" a schema onto the current search path b) the ability to "pull" a schema off the current search path push, pop, s

Re: [HACKERS] search_path improvements WAS: search_path vs extensions

2009-05-29 Thread Greg Stark
On Fri, May 29, 2009 at 10:52 PM, Josh Berkus wrote: > Sometimes one needs to use schemas just for namespacing (they are called > "namespaces" after all), and not for security or visibility. What's the point of "namespaces" if not to implement visibility? The interesting thing to do would be to

Re: [HACKERS] search_path improvements WAS: search_path vs extensions

2009-05-29 Thread Greg Stark
On Fri, May 29, 2009 at 11:03 PM, David E. Wheeler wrote: > On May 29, 2009, at 2:52 PM, Josh Berkus wrote: > >> a) the ability to "push" a schema onto the current search path >> b) the ability to "pull" a schema off the current search path > > push, pop, shift, unshift. :-) > > Come to think of i

Re: [HACKERS] search_path improvements WAS: search_path vs extensions

2009-05-29 Thread David E. Wheeler
On May 29, 2009, at 2:52 PM, Josh Berkus wrote: a) the ability to "push" a schema onto the current search path b) the ability to "pull" a schema off the current search path push, pop, shift, unshift. :-) Come to think of it, I want these for arrays, too. ;-) Best, David -- Sent via pgsql-h

Re: [HACKERS] search_path improvements WAS: search_path vs extensions

2009-05-29 Thread Josh Berkus
Greg, Do we really? The only reason people are having trouble managing their search_path is because they're not using it as intended and putting things in lots of different schemas that they intend to all be visible. Apparently you've never adminned a database with hundreds (or thousands) of