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 <jinfros...@mail.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>

Reply via email to