Re: proposal psql \gdesc

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal psql \gdesc
Date: 2017-05-20 17:58:57
Message-ID: CAFj8pRDUsOinVewa5xM2=TQNoRiPEwRFq8JV4ELChQjMg_8XSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

2017-05-20 9:15 GMT+02:00 Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>:

>
> Hello Pavel,
>
> I am sending a variant with message instead empty result.
>>
>
> Thanks. Patch looks good, applies, make check ok, code is neat.
>
> Personally I prefer empty result instead message.
>>
>
> Hmm. I think that this version is less likely to raise questions from
> users, especially compared to having a somehow correct but strangely
> looking description.
>
> It is hard to choose some good text of this message. Empty result is just
>> empty result for all cases.
>>
>
we will see

>
> I'd suggest a very minor change: "No columns or command has no result"
> (not -> no). If some English native speaker has a better suggestion, fine
> with me.
>

changed

>
> Another good point of this version is that the type name query is
> simplified because it does not need to handle an empty result, thus the
> code is easier to understand.
>
> A few other suggestions:
>
> - could you update the comment on the type name query?
> Maybe the comment can be simply removed?
>
>
removed

> - I'm wondering whether the Name & Type columns names should be
> translatable. What do you think?
>

good idea - done

>
> - Maybe tests could also exercise unnamed columns, eg:
> SELECT 1, 2, 3 \gdesc \g

done

Regards

Pavel

>
>
> --
> Fabien.
>

Attachment Content-Type Size
psql-gdesc-05.patch text/x-patch 9.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cyril Auburtin 2017-05-20 18:26:00 Re: Allowing dash character in LTREE
Previous Message Tom Lane 2017-05-20 17:48:00 Tightening isspace() tests where behavior should match SQL parser