Thread: support for connection parameters

support for connection parameters

From
Olaf Frączyk
Date:
Hello,

When I define a new connection to a server I can enter
host,port,username etc.

I want to be able to define "search_path" to work with different
schemas. I don't wan't to create a dozen of login roles with different
search_path setting. 

The simplest solution would be to be able to define such variables at
"Object browser" level. Then I could create several connections to my
server with different search_path settings.

However there is no way to do it nor to add an SQL statement to be
executed at the beginning of every connection.

There are other useful settings that could be managed this way.

Is there any hope that it will be implemented in some future version?

Please CC me, as I'm not subscribed

Regards,

Olaf Fraczyk


-- 
Olaf Frączyk <olaf@cbk.poznan.pl>



Re: support for connection parameters

From
"Dave Page"
Date:
On Thu, Aug 21, 2008 at 3:32 PM, Olaf Frączyk <olaf@cbk.poznan.pl> wrote:
> Hello,
>
> When I define a new connection to a server I can enter
> host,port,username etc.
>
> I want to be able to define "search_path" to work with different
> schemas. I don't wan't to create a dozen of login roles with different
> search_path setting.
>
> The simplest solution would be to be able to define such variables at
> "Object browser" level. Then I could create several connections to my
> server with different search_path settings.
>
> However there is no way to do it nor to add an SQL statement to be
> executed at the beginning of every connection.
>
> There are other useful settings that could be managed this way.
>
> Is there any hope that it will be implemented in some future version?

What do you expect it to accomplish? As a graphical tool, pgAdmin
steps neatly round the vast majority of search path issues in the user
interface. It's only when you start using the query tool that you
might want to tweak the search path (and in that case, just store the
required SET query as a macro, and run it as needed.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Re: support for connection parameters

From
Olaf Frączyk
Date:
On Thu, 2008-08-21 at 16:11 +0100, Dave Page wrote:
> On Thu, Aug 21, 2008 at 3:32 PM, Olaf Frączyk <olaf@cbk.poznan.pl> wrote:
> > Hello,
> >
> > When I define a new connection to a server I can enter
> > host,port,username etc.
> >
> > I want to be able to define "search_path" to work with different
> > schemas. I don't wan't to create a dozen of login roles with different
> > search_path setting.
> >
> > The simplest solution would be to be able to define such variables at
> > "Object browser" level. Then I could create several connections to my
> > server with different search_path settings.
> >
> > However there is no way to do it nor to add an SQL statement to be
> > executed at the beginning of every connection.
> >
> > There are other useful settings that could be managed this way.
> >
> > Is there any hope that it will be implemented in some future version?
> 
> What do you expect it to accomplish? As a graphical tool, pgAdmin
> steps neatly round the vast majority of search path issues in the user
> interface. It's only when you start using the query tool that you
> might want to tweak the search path (and in that case, just store the
> required SET query as a macro, and run it as needed.
> 
Yes, I use it for query tool (I use "Favourites").
However it needs to be done for every query tool window, as every window
creates a separate connection. It's not nice but I could live with it.

The problem is that I use functions and trigger functions that need
search_path to be set correctly. So it breaks if I try to
insert/modify/delete data in a table using the graphical tool.

And hardcoding schemas in functions is not the way to go :)

Regards,

Olaf

-- 
Olaf Frączyk <olaf@cbk.poznan.pl>