From: | Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com> |
---|---|
To: | "J(dot)F(dot) Oster" <jinfroster(at)mail(dot)ru> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: new feature for Query tool: Favourites injection |
Date: | 2014-07-19 21:12:04 |
Message-ID: | CAG7mmoxxCPG0QHDNBJYovGd4o0R58eva0sPpo83=PVdkxmUfLQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi,
The patch looks good to me.
It's a nice and simple feature.
Checked-in it.
Thanks
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>
*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>
On Wed, Jul 9, 2014 at 9:54 PM, J.F. Oster <jinfroster(at)mail(dot)ru> wrote:
> Hello!
>
> When writing ad hoc queries or plpgsql code it is often handy to
> operate with small text snippets as the building blocks.
> PgAdmin has no Templates feature, but Favourites is very close to it.
> What is missing - the ability to quickly apply (inject) some snippet
> in the cursor position, preferably without touching the mouse.
>
> Suggested implementation allows to type desired favourite's name right
> into the text area and press a hotkey (I think it should be F2 or some
> other single button - for speed). The word under cursor gets searched
> among favourite's names and if found - is replaced with favourite's
> contents. Cursor gets positioned after it, and we are ready to type
> further.
> For expample, if I have to write some typical query like:
> SELECT COUNT(*) FROM table1
> WHERE column1 IS DISTINCT FROM 100;
> Using my Favourites I have to type just:
> scf<F2>table1
> w<F2>column1 idf<F2>100;
>
> Also if I often address ad hoc queries to some specific tables with
> long names, I can make templates for them:
> sfbcah<F2> = SELECT * FROM billing.client_attr_hist
> And so on.
>
> For convenience all these quick and short favourites can be stored in
> a separate subfolder.
> After some preparation and training one can make his everyday SQL
> typing much more pleasant :)
>
>
> Also this patch adds a "proposed" file name for queries whose origin
> is INITIAL. Query texts passed to the constructor are always based on
> some object (DDL, SELECT, INSERT on it and so on). If the user chooses
> to save such a query, the filename probably will contain object's
> name. Well, if not - the user will type in his own name with same
> number of keystrokes. In my experience it works just fine in many
> cases, for example, saving DDLs to SVN.
>
>
> --
> Best regards,
> J.F.
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2014-07-20 20:38:25 | Re: [pgadmin-hackers] Re: 答复: [pgadmin-hackers] pgAdmin III commit: Fix SQL for GRANT on a sequence |
Previous Message | Ashesh Vashi | 2014-07-19 21:11:12 | pgAdmin III commit: Allow quick injectection of favourites by name |