Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDYVT-0003gU-8i for pgadmin-hackers@arkaria.postgresql.org; Wed, 12 Feb 2014 12:01:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WDYVS-0008QZ-OC for pgadmin-hackers@arkaria.postgresql.org; Wed, 12 Feb 2014 12:01:34 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDYVR-0008QN-VH for pgadmin-hackers@postgresql.org; Wed, 12 Feb 2014 12:01:34 +0000 Received: from mail-ve0-f182.google.com ([209.85.128.182]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDYVO-0003ru-1G for pgadmin-hackers@postgresql.org; Wed, 12 Feb 2014 12:01:33 +0000 Received: by mail-ve0-f182.google.com with SMTP id jy13so7323368veb.13 for ; Wed, 12 Feb 2014 04:01:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=QIIOIZnl/PUJLwXVhyZ4mR3qZXwGh4pySg67n3nUyvY=; b=QvfZn4c0zEjUGBl+jDcAW9YIl2JOzOp35A+XPSro50Si334cCScnyLUh06gXzMg5Ad mPOblAzTB8CO45XZtTdQeZ9tyIy7n1449DBMcqgDalZzQr8Wy6y9vATtkOAVw9MHr/1S 3hdYgADbbafq3AdIDlDhGbaqkLGkQZU/c8daHVQjaEugIhlL5HrJ9V5zCc9FaofMY8Op gEMxAr293n7PHdXdGHsCUvRUpkhuKVVfTLXLDXciqy/AAqXUX9Z9DCeyP6C75/BPlH2g 1XXryYB76vX9sbeXq7uPONkvNaXWE7CdVsGVwsLW+tYaiYwsOfonlfMf/XhAV+pT8bQg /Vyw== X-Gm-Message-State: ALoCoQmdx0g6qBIqAZ2WJPhSJuswup+Y2cTn+VW15F82znMsSReGEDKHbGLIbOgYFw7JjuNU4NYF MIME-Version: 1.0 X-Received: by 10.52.247.231 with SMTP id yh7mr759113vdc.34.1392206489162; Wed, 12 Feb 2014 04:01:29 -0800 (PST) Received: by 10.58.94.130 with HTTP; Wed, 12 Feb 2014 04:01:29 -0800 (PST) In-Reply-To: <1874777122.20140211213303@mail.ru> References: <1874777122.20140211213303@mail.ru> Date: Wed, 12 Feb 2014 12:01:29 +0000 Message-ID: Subject: Re: Ways to improve PgAdmin III SQL context help From: Dave Page To: "J.F. Oster" Cc: PostgreSQL-documentation , pgadmin-hackers Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi On Tue, Feb 11, 2014 at 5:33 PM, J.F. Oster wrote: > 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! I can see that would be useful. > 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 > , , etc - about 15 of them are most > informative. > - Locations (Page, Anchor, Title), collected from , > 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, is 10000, but > 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? I have no objection to extending the capabilities in general. > 2. Is supposed workflow for index bundling acceptable? However, I'm really not keen on this idea for a couple of reasons: 1) We used to include the PostgreSQL documentation with pgAdmin, and it was a *real* pain to maintain. We got rid of it because it was so burdensome, and because virtually everyone works online now anyway. 2) Building the PG docs on Windows is nigh-on impossible. Including the feature you suggest would make it near impossible to build pgAdmin on Windows - at best it would probably require building the docs on a Linux system first, which is not 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. Aside from the issues above, we already have search capabilities in Sphinx (though, I haven't spent time playing with them yet). I wonder if an alternate approach to this problem would be to have a web service on one of our machines that can create the keyword index of the PostgreSQL docs, that can be downloaded and cached for use by pgAdmin, or other apps. > > I'd like to work on subject and look for any constructive opinions. > Thanks! > > -- > 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 -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers