Re: psql \df choose functions by their arguments

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql \df choose functions by their arguments
Date: 2020-11-03 14:27:04
Message-ID: CAKAnmmKs7zvG3pDww+5fUzwGvjx5epzKmdfbj-QvVzDxyyXe4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for looking this over!

> some Abbreviations of common types are not added to the
> type_abbreviations[] Such as:
>
> Int8 => bigint
>

I wasn't aiming to provide a canonical list, as I personally have never
seen anyone use int8 instead of bigint when (for example) creating a
function, but I'm not strongly opposed to expanding the list.

Single array seems difficult to handle it, may be we can use double array
> or use a struct.
>

I think the single works out okay, as this is a simple write-once variable
that is not likely to get updated often.

> And I think It's better to update '/?' info about '\df[+]' in function
> slashUsage(unsigned short int pager).
>

Suggestions welcome, but it's already pretty tight in there, so I couldn't
think of anything:

fprintf(output, _(" \\dew[+] [PATTERN] list foreign-data
wrappers\n"));
fprintf(output, _(" \\df[anptw][S+] [PATRN] list [only
agg/normal/procedures/trigger/window] functions\n"));
fprintf(output, _(" \\dF[+] [PATTERN] list text search
configurations\n"));

The \df option is already our longest one, even with the silly attempt to
shorten PATTERN :)

Cheers,
Greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2020-11-03 14:31:32 Re: psql \df choose functions by their arguments
Previous Message Alvaro Herrera 2020-11-03 13:42:34 Re: PATCH: Batch/pipelining support for libpq