Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion
Date
Msg-id CAD21AoBiGkvFpizGAWt-8mQEja3_Afu0pjn09vR1Gk7d+zj_Cw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
On Tue, Jan 5, 2021 at 6:08 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
>
> +               COMPLETE_WITH_QUERY(Query_for_list_of_cursors
> +                                                       " UNION SELECT 'ABSOLUTE'"
> +                                                       " UNION SELECT 'BACKWARD'"
> +                                                       " UNION SELECT 'FORWARD'"
> +                                                       " UNION SELECT 'RELATIVE'"
> +                                                       " UNION SELECT 'ALL'"
> +                                                       " UNION SELECT 'NEXT'"
> +                                                       " UNION SELECT 'PRIOR'"
> +                                                       " UNION SELECT 'FIRST'"
> +                                                       " UNION SELECT 'LAST'"
> +                                                       " UNION SELECT 'FROM'"
> +                                                       " UNION SELECT 'IN'");
>
> This change makes psql unexpectedly output "FROM" and "IN" just after "FETCH".

I think "FROM" and "IN" can be placed just after "FETCH". According to
the documentation, the direction can be empty. For instance, we can do
like:

postgres(1:7668)=# begin;
BEGIN

postgres(1:7668)=# declare test cursor for select relname from pg_class;
DECLARE CURSOR

postgres(1:7668)=# fetch from test;
   relname
--------------
 pg_statistic
(1 row)

postgres(1:7668)=# fetch in test;
 relname
---------
 pg_type
(1 row)

Regards,

--
Masahiko Sawada
EnterpriseDB:  https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: logical replication worker accesses catalogs in error context callback
Next
From: Fujii Masao
Date:
Subject: Re: [PATCH] Feature improvement for CLOSE, FETCH, MOVE tab completion