Thread: Patch: commandline connect/launch

Patch: commandline connect/launch

From
"Magnus Hagander"
Date:
Attached patch makes it possibe to specify a server description to
auto-connect to on the commandline ("-s mydbserver"), and also to have
pgAdmin automatically launch the query tool ("-s mydbserver -q"). It
will still open the main window as well, as there seems to be
interaction between the query window and the main one that I'm not fully
understanding yet :)

It also rearranges the commandline parsing to use the wx class for
commandline parsing. It just made things much easier to do it that way.
Hopefully I didn't break anything else :-) As a bonus, there is now a
"/h" for help on commandline args.

Thoughts/comments?

//Magnus


Attachment

Re: Patch: commandline connect/launch

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Magnus Hagander
> Sent: 08 January 2006 16:56
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] Patch: commandline connect/launch
>
> Attached patch makes it possibe to specify a server description to
> auto-connect to on the commandline ("-s mydbserver"), and also to have
> pgAdmin automatically launch the query tool ("-s mydbserver -q"). It
> will still open the main window as well, as there seems to be
> interaction between the query window and the main one that
> I'm not fully
> understanding yet :)
>
> It also rearranges the commandline parsing to use the wx class for
> commandline parsing. It just made things much easier to do it
> that way.
> Hopefully I didn't break anything else :-) As a bonus, there is now a
> "/h" for help on commandline args.

Thanks - patch committed with minor changes:

- Added documentation for all command line options

- Modified the patch to restore the server environment, but only if -q
is not used.

Regards, Dave.

Re: Patch: commandline connect/launch

From
"Magnus Hagander"
Date:
> > Attached patch makes it possibe to specify a server description to
> > auto-connect to on the commandline ("-s mydbserver"), and
> also to have
> > pgAdmin automatically launch the query tool ("-s mydbserver
> -q"). It
> > will still open the main window as well, as there seems to be
> > interaction between the query window and the main one that I'm not
> > fully understanding yet :)
> >
> > It also rearranges the commandline parsing to use the wx class for
> > commandline parsing. It just made things much easier to do it that
> > way.
> > Hopefully I didn't break anything else :-) As a bonus,
> there is now a
> > "/h" for help on commandline args.
>
> Thanks - patch committed with minor changes:
>
> - Added documentation for all command line options
>
> - Modified the patch to restore the server environment, but
> only if -q is not used.

Thanks!

//Magnus

Re: Patch: commandline connect/launch

From
Andreas Pflug
Date:
Magnus Hagander wrote:
> Attached patch makes it possibe to specify a server description to
> auto-connect to on the commandline ("-s mydbserver"), and also to have
> pgAdmin automatically launch the query tool ("-s mydbserver -q"). It
> will still open the main window as well, as there seems to be
> interaction between the query window and the main one that I'm not fully
> understanding yet :)
>
> It also rearranges the commandline parsing to use the wx class for
> commandline parsing. It just made things much easier to do it that way.
> Hopefully I didn't break anything else :-) As a bonus, there is now a
> "/h" for help on commandline args.

Ok, back from holidays, trying to catch up (with only few time to
spent). Fixed doc (-c takes directory) and help strings (translatable).

Regards,
Andreas