No explanation of other options

Started by PG Bug reporting formover 2 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/sql-move.html
Description:

A few more examples with the other options would be helpful.

MOVE LAST for example shows NULL,
What does MOVE ALL do?

#2jian he
jian.universality@gmail.com
In reply to: PG Bug reporting form (#1)
Re: No explanation of other options

On Tue, Oct 17, 2023 at 7:00 PM PG Doc comments form
<noreply@postgresql.org> wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/sql-move.html
Description:

A few more examples with the other options would be helpful.

MOVE LAST for example shows NULL,
What does MOVE ALL do?

I found out demo in
https://git.postgresql.org/cgit/postgresql.git/tree/src/test/regress/expected/subselect.out#n1665

You can try it:
begin;
declare c1 scroll cursor for
select * from generate_series(1,4) i
where i <> all (values (2),(3));
move forward all in c1;
fetch all in c1;
commit;

move the default direction is forward. so "move all" will act the same
as "move forward all".