Re: bugfix: --echo-hidden is not supported by \sf statements

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Josh Kupershmidt <schmiddy(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bugfix: --echo-hidden is not supported by \sf statements
Date: 2013-02-27 15:47:43
Message-ID: CAFj8pRBSo7i6aUQVqZn6JmnTjwG_vncAJmo5oQmhR=ayY6+Okw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/2/27 Stephen Frost <sfrost(at)snowman(dot)net>:
> Pavel,
>
> * Pavel Stehule (pavel(dot)stehule(at)gmail(dot)com) wrote:
>> this is not hard task, hard task is correct identification related function
>>
>> see FuncnameGetCandidates() function
>
> We're not limited to writing C code here though and I think we've
> already solved it, though I admit it wasn't where I originally thought.
>
>> I am sure, so we don't would to duplicate this function on client side.
>
> It took me a bit to go figure out where it is, but I knew we had it.
> Look at COMPLETE_WITH_FUNCTION_ARG and Query_for_list_of_arguments in
> src/bin/psql/tab-complete.c. We can already fully tab-complete a
> function and its arguments, down to knowing that the function+args is
> unique. I have no idea why \df and friends aren't already supporting
> this (is there a real reason or just unintentional omission? would love
> to know..), but it works just fine for DROP FUNCTION and ALTER FUNCTION.
> Would be really nice to have that work for \df, \ef, \sf, CREATE OR
> REPLACE FUNCTION, and anywhere else that makes sense.
>
> With support for what tab-complete returns (arg types w/o arg names) and
> \df's function list result set (arg names + arg types), I think we can
> happily close this out. I don't think we need to stress about people
> complaining that \ef myfunc(int) doesn't find a matching function when
> they can do \ef myfunc(int<tab> and have it tab-complete the rest.
>

this autocomplete routine doesn't know type synonyms

so you cannot use int, varchar, ... :(

Pavel

> Thanks,
>
> Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-02-27 16:22:53 Re: Review : Add hooks for pre- and post-processor executables for COPY and \copy
Previous Message Stephen Frost 2013-02-27 13:58:15 Re: Strange Windows problem, lock_timeout test request