Re: psql \df choose functions by their arguments - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: psql \df choose functions by their arguments
Date
Msg-id CAKAnmmKs7zvG3pDww+5fUzwGvjx5epzKmdfbj-QvVzDxyyXe4A@mail.gmail.com
Whole thread Raw
In response to RE: psql \df choose functions by their arguments  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Responses Re: psql \df choose functions by their arguments
List 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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PATCH: Batch/pipelining support for libpq
Next
From: Greg Sabino Mullane
Date:
Subject: Re: psql \df choose functions by their arguments