Tab completion for CREATE TYPE

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Tab completion for CREATE TYPE

Thomas Munro-5
Hi,

Since I keep forgetting the syntax and options, here is $SUBJECT.

--
Thomas Munro
https://enterprisedb.com

0001-Tab-completion-for-CREATE-TYPE.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tab completion for CREATE TYPE

Kyotaro HORIGUCHI-2
Hello.

At Tue, 14 May 2019 17:50:58 +1200, Thomas Munro <[hidden email]> wrote in <CA+hUKGLk=0yLDjfviONJLzcHEzygj=[hidden email]>
> Hi,
>
> Since I keep forgetting the syntax and options, here is $SUBJECT.

I played with this a bit and found that "... (attr=[tab]" (no
space between "r" and "=") complets with '='. Isn't it annoying?

Only "UPDATE hoge SET a=[tab]" behaves the same way among
existing completions.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center



Reply | Threaded
Open this post in threaded view
|

Re: Tab completion for CREATE TYPE

Thomas Munro-5
On Tue, May 14, 2019 at 6:18 PM Kyotaro HORIGUCHI
<[hidden email]> wrote:
> I played with this a bit and found that "... (attr=[tab]" (no
> space between "r" and "=") complets with '='. Isn't it annoying?
>
> Only "UPDATE hoge SET a=[tab]" behaves the same way among
> existing completions.

Hmm.  True.  Here's one way to fix that.

--
Thomas Munro
https://enterprisedb.com

0001-Tab-completion-for-CREATE-TYPE-v2.patch (3K) Download Attachment
0002-Fix-tab-completion-of-UPDATE-v2.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tab completion for CREATE TYPE

Edgy Hacker
On Tue, May 14, 2019 at 06:58:14PM +1200, Thomas Munro wrote:
> On Tue, May 14, 2019 at 6:18 PM Kyotaro HORIGUCHI
> <[hidden email]> wrote:
> > I played with this a bit and found that "... (attr=[tab]" (no
> > space between "r" and "=") complets with '='. Isn't it annoying?
> >
> > Only "UPDATE hoge SET a=[tab]" behaves the same way among
> > existing completions.
>
> Hmm.  True.  Here's one way to fix that.

Hmm... just got here.

What happens around here?

>
> --
> Thomas Munro
> https://enterprisedb.com





Reply | Threaded
Open this post in threaded view
|

Re: Tab completion for CREATE TYPE

Thomas Munro-5
On Tue, May 14, 2019 at 8:32 PM Edgy Hacker <[hidden email]> wrote:
> Hmm... just got here.

Welcome.

> What happens around here?

Please see https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F .

--
Thomas Munro
https://enterprisedb.com


Reply | Threaded
Open this post in threaded view
|

Re: Tab completion for CREATE TYPE

Edgy Hacker
On Tue, May 14, 2019 at 09:01:27PM +1200, Thomas Munro wrote:
> On Tue, May 14, 2019 at 8:32 PM Edgy Hacker <[hidden email]> wrote:
> > Hmm... just got here.
>
> Welcome.

Thanks.

>
> > What happens around here?
>
> Please see https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F .

Not exactly a prospective developer but if it ever comes it...

>
> --
> Thomas Munro
> https://enterprisedb.com


Reply | Threaded
Open this post in threaded view
|

Re: Tab completion for CREATE TYPE

Kyotaro HORIGUCHI-2
In reply to this post by Thomas Munro-5
At Tue, 14 May 2019 18:58:14 +1200, Thomas Munro <[hidden email]> wrote in <CA+hUKG+ojKTKw=aG6QU=[hidden email]>
> On Tue, May 14, 2019 at 6:18 PM Kyotaro HORIGUCHI
> <[hidden email]> wrote:
> > I played with this a bit and found that "... (attr=[tab]" (no
> > space between "r" and "=") complets with '='. Isn't it annoying?
> >
> > Only "UPDATE hoge SET a=[tab]" behaves the same way among
> > existing completions.
>
> Hmm.  True.  Here's one way to fix that.

Thanks. That's what was in my mind.

Some definition item names are induced from some current states
(e.g. "CREATE TYPE name AS RANGE (" => "SUBTYPE = ") but I think
it's too much.

COLLATE is not suggested with possible collations but I think
suggesting it is not so useful.

PASSEDBYVALUE is suggested with '=', which is different from
documented syntax but I don't think that's not such a problem for
those who spell this command out.

# By the way, collatable and preferred are boolean which behaves
# the same way with passedbyvalue. Is there any intention in the
# difference in the documentation?

The completion lists contain all possible words correctly (I
think "analyse" is an implicit synonym.).

As the result, I find it perfect.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center