From: | Edmund Horner <ejrh00(at)gmail(dot)com> |
---|---|
To: | Joao De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PATCH: psql tab completion for SELECT |
Date: | 2018-07-17 01:44:59 |
Message-ID: | CAMyN-kA3Ld7E79rRnDij-5poBHS4w4bJd7jkOTbBXNouSgafMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 17 July 2018 at 03:27, Joao De Almeida Pereira
<jdealmeidapereira(at)pivotal(dot)io> wrote:
> After playing alittle bit around with the patch I noticed that a comma was
> missing in line 1214
> + 1202 /* min_server_version */
> + 1203 90000,
> + 1204 /* catname */
> + 1205 "pg_catalog.pg_proc p",
> + 1206 /* selcondition */
> + 1207 "p.prorettype NOT IN ('trigger'::regtype,
> 'internal'::regtype) "
> + 1208 "AND 'internal'::regtype != ALL (p.proargtypes) "
> + 1209 "AND p.oid NOT IN (SELECT
> unnest(array[typinput,typoutput,typreceive,typsend,typmodin,typmodout,typanalyze])
> FROM pg_type) "
> + 1210 "AND p.oid NOT IN (SELECT
> unnest(array[aggtransfn,aggfinalfn]) FROM pg_aggregate) "
> + 1211 "AND p.oid NOT IN (SELECT
> unnest(array[oprcode,oprrest,oprjoin]) FROM pg_operator) "
> + 1212 "AND p.oid NOT IN (SELECT
> unnest(array[lanplcallfoid,laninline,lanvalidator]) FROM pg_language) "
> + 1213 "AND p.oid NOT IN (SELECT castfunc FROM pg_cast) "
> + 1214 "AND p.oid NOT IN (SELECT amproc FROM pg_amproc) "
> + 1215 /* viscondition */
> + 1216 "pg_catalog.pg_function_is_visible(p.oid)",
>
> To catch these typos would be good if we could get some testing around psql.
> (Newbie question: do we have any kind of testing around tools like psql?)
>
> Thanks
> Joao
Hi Joao,
Ah yes, the embarrassing missing comma. I kind of wish my IDE or
compiler had pointed it out to me, but how was it to know that I
foolishly combining two struct fields? Sadly, I think the best
defence right now is to have others scrutinise the code.
I attached a new version of the patch in reply to Heikki. Would you
care to take a careful look for me?
I think some automated test framework for the tab completion queries
is possible, by calling psql_completion and examining the results.
Maybe someone will volunteer...
Edmund
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2018-07-17 01:48:48 | Re: How to make partitioning scale better for larger numbers of partitions |
Previous Message | Edmund Horner | 2018-07-17 01:31:20 | Re: PATCH: psql tab completion for SELECT |