CREATE EXTENSION postgres_fdw;
DO $d$
    BEGIN
        EXECUTE $$CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw
            OPTIONS (dbname '$$||current_database()||$$',
                     port '$$||current_setting('port')||$$'
            )$$;
    END;
$d$;
CREATE USER MAPPING FOR CURRENT_USER SERVER loopback;

drop table if exists utrtest, loct2, loct3, loct4;

create table utrtest (a int, b text) partition by list (a);

create table locp (a int check (a in (1)), b text);
alter table utrtest attach partition locp for values in (1);
insert into utrtest values (1, 'one');

create table loct2 (a int check (a in (2)), b text);
create foreign table remp2 (a int check (a in (2)), b text)
  server loopback options (table_name 'loct2');
alter table utrtest attach partition remp2 for values in (2);
insert into utrtest values (2, 'two');

create table loct3 (a int check (a in (3)), b text);
create foreign table remp3 (a int check (a in (3)), b text)
  server loopback options (table_name 'loct3');
alter table utrtest attach partition remp3 for values in (3);
insert into utrtest values (3, 'three');

create table loct4 (a int check (a in (4)), b text);
create foreign table remp4 (a int check (a in (4)), b text)
  server loopback options (table_name 'loct4');
alter table utrtest attach partition remp4 for values in (4);
insert into utrtest values (4, 'four');

explain (verbose, costs off)
update utrtest set a = 1
  from generate_series(1,4) s(x) where a = s.x returning *;
