Re: [pgAdmin4][patch] SQL Keywords extract utility

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][patch] SQL Keywords extract utility
Date: 2019-03-20 08:20:52
Message-ID: CAM9w-_nBNN8se+qko=CFcAA+dWBjwyRZJ8=5ss=-dWkphLVb9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

On Tue, Mar 19, 2019 at 9:46 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Tue, Mar 19, 2019 at 10:43 AM Aditya Toshniwal <
> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>
>> Hi Hackers,
>>
>> Attached is a small utility which help in getting the SQL keywords used
>> by PostgreSQL and pl/pgsql.
>> Note that, for pgsql code path is required as keywords are not available
>> in any docs. So, the code paths may need to change with new release of
>> PostgreSQL. For PostgrSQL keywords, it will fetch from the website.
>>
>> Kindly review.
>>
>
> A few thoughts:
>
> - The code isn't PEP-8 compliant.
>
> - Do we really need to call pip on every invocation? Why not just add a
> requirements.txt file to the tools directory?
>
I thought it should be a venv independent utility. Better will add to
requirements.

>
> - I think we should grab the current version number for PostgreSQL from
> https://www.postgresql.org/docs/current/index.html (get it from the title
> tag), then use that to construct the URL to the source, e.g.
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/pl/plpgsql/src/pl_scanner.c;hb=REL_11_2
>
OK, I can pull the version number no issues. But, the code paths still may
need changes per release.

>
> - I'd suggest that the only output should be the keywords, so the output
> can be redirected into a file without any extra messages etc.
>
Yeah right.

Will send an updated patch.

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

--
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2019-03-20 08:57:49 pgAdmin 4 commit: Fix PEP-8 issue and move the pycodestyle config into
Previous Message Khushboo Vashi 2019-03-20 07:30:11 [pgAdmin4][Patch] - RM 4030 - IDENTITY column not recognised