Redshift performs FETCH ALL when prompted NEXT

115 Views Asked by At

While using SQL Workbench/j I noticed odd behaviour on a single-node Redshift's (dc2.large;nodes: 1) end.

When running below procedure with FETCH NEXT (which is is a must for single nodes) I'm still getting an error...

FORWARD 1 and FORWARD 0 also didn't help...

ERROR: Fetch ALL is not supported on single-node clusters. Please specify the fetch size (maximum 1000 for single-node clusters) or upgrade to a multi node installation.

CREATE OR REPLACE PROCEDURE public.sp_proc_with_in_var_two (f1 VARCHAR, rs_out INOUT refcursor)
AS
$$ BEGIN
    RAISE INFO 'f1 = %',f1;
    OPEN rs_out FOR SELECT f1 as v;
   END;
$$ LANGUAGE plpgsql;
/

BEGIN;

CALL public.sp_proc_with_in_var_two('my_val_to_show','mycur');
FETCH NEXT 1 FROM mycur;

COMMIT;

My setup:

enter image description here enter image description here

0

There are 0 best solutions below