Thread: Re: BUG #17772: small glitch with autocompletion on CREATE DATABASE

Re: BUG #17772: small glitch with autocompletion on CREATE DATABASE

From
Andrey Lizenko
Date:
W\o TO in command for sure, sorry for this

postgres=# create database atestdb owner
<TAB> 
postgres=# create database atestdb owner

On Mon, 6 Feb 2023 at 02:52, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      17772
Logged by:          Andrey Lizenko
Email address:      lizenko79@gmail.com
PostgreSQL version: 15.1
Operating system:   Ubuntu 20.04.5 LTS
Description:       

Hi, here is a very minor issue with a native psql client:

postgres=# create role atest login;
CREATE ROLE

postgres=# create role btest login;
CREATE ROLE

postgres=# create database atestdb owner to
<Pressing TAB here, nothing happens, roles list expected>

postgres=# create database atestdb owner atest;
CREATE DATABASE
<however, it works>

postgres=# reassign owned by atest to btest ;
REASSIGN OWNED
<it works also in terms of autocomplete>

postgres@xxx:~$ psql
psql (15.1 (Ubuntu 15.1-1.pgdg20.04+1))
Type "help" for help.

postgres=# show server_version;
          server_version
----------------------------------
 15.1 (Ubuntu 15.1-1.pgdg20.04+1)
(1 row)



--
Regards, Andrei Lizenko

Re: BUG #17772: small glitch with autocompletion on CREATE DATABASE

From
Tom Lane
Date:
Andrey Lizenko <lizenko79@gmail.com> writes:
>> postgres=# create database atestdb owner to
>> <Pressing TAB here, nothing happens, roles list expected>

AFAICS in tab-complete.c, there's no attempt to cover this case,
so this isn't a bug but an unimplemented feature.  Send a patch
if it bothers you enough.

(BTW, "TO" is not part of this syntax according to the docs.)

            regards, tom lane