Re: [HACKERS] proposal psql \gdesc - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] proposal psql \gdesc
Date
Msg-id alpine.DEB.2.20.1705200845450.6053@lancre
Whole thread Raw
In response to Re: [HACKERS] proposal psql \gdesc  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] proposal psql \gdesc
List pgsql-hackers
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.

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.

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?
 - I'm wondering whether the Name & Type columns names should be   translatable. What do you think?
 - Maybe tests could also exercise unnamed columns, eg:    SELECT 1, 2, 3 \gdesc \g

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] Re: proposal - using names as primary names of plpgsqlfunction parameters instead $ based names
Next
From: Heikki Linnakangas
Date:
Subject: Re: [HACKERS] Removal of plaintext password type references