Ways to improve PgAdmin III SQL context help

From: "J(dot)F(dot) Oster" <jinfroster(at)mail(dot)ru>
To: pgsql-docs(at)postgresql(dot)org, pgadmin-hackers(at)postgresql(dot)org
Subject: Ways to improve PgAdmin III SQL context help
Date: 2014-02-11 17:33:03
Message-ID: 1874777122.20140211213303@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgsql-docs

Hello All!

Currently when I press F1 in the SQL Query window, PgAdmin III looks
for first token of selected (or whole) text, recognizes most of SQL
commands and tries to open corresponding help page.

I tried to extend that list with data types, functions, system
catalogs&views etc:
https://github.com/jinfroster/pgadmin3/commit/6e70b9f2252ec22e22c4188d5cfe0cf18e6ce7a2
Yeah, quite a stupid way :) but after a week of testing it
(writing queries and pl/pgsql), I have a positively pleasant
experience, even that is really helpful!

Which way is better? IMO it is reasonable to index whole Postgre's
actual doc/src/sgml/*.sgml in a separate PgAdmin's build target and
bundle fresh index file with every release of PgAdmin.
Branded distributions could use same workflow if their documentation
inherits same SGML.
Index file should contain:
- Keywords to be searched, collected from several DocBook tags like
<term>, <indexterm>, <acronym> etc - about 15 of them are most
informative.
- Locations (Page, Anchor, Title), collected from <sect1>, <chapter>
etc.
- Weights (keyword K in location L has weigth W).
W(K,L) = sum(Nklt * Wt), where
Nklt is number of occurences of keyword K in location L in tag T
Wt is weight for tag T (say, <indexterm> is 10000, but
<literal> is 1 etc).

So a user can get most relevant Page#Anchor instantly for a word under
cursor, or a sorted list of pages to choose from (Title will be useful
here).

Currently my questions are:
1. Is such development interesting to the community?
2. Is supposed workflow for index bundling acceptable?
3. May be, some ready-made open source solution can be used for
indexing DocBook SGML and later searching? It's searching engine is to
be incorporated into PgAdmin.

I'd like to work on subject and look for any constructive opinions.
Thanks!

--
Best regards,
J.F.

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message David E. Wheeler 2014-02-11 18:50:51 Re: Add CREATE EXTENSION Support
Previous Message Dave Page 2014-02-11 17:16:58 Re: Add CREATE EXTENSION Support

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2014-02-12 02:58:25 Re: Links for upgraders
Previous Message Robert Haas 2014-02-09 13:33:59 Re: [HACKERS] Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)