On Tue, Jan 5, 2021 at 6:08 PM Fujii Masao <masao.fu...@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/


Reply via email to