test=*# with x as (select min(id) as id from anmeldungen where name is null) update anmeldungen set name = 'ich' from x where anmeldungen.id = x.id returning x.id;
id
----
1
(1 row)
UPDATE 1
Time: 0,570 ms
test=*# with x as (select min(id) as id from anmeldungen where name is null) update anmeldungen set name = 'du' from x where anmeldungen.id = x.id returning x.id;
id
----
2
(1 row)
UPDATE 1
Time: 0,473 ms
test=*# with x as (select min(id) as id from anmeldungen where name is null) update anmeldungen set name = 'name3' from x where anmeldungen.id = x.id returning x.id;
id
----
3
(1 row)
UPDATE 1
Time: 0,478 ms
test=*# with x as (select min(id) as id from anmeldungen where name is null) update anmeldungen set name = 'name4' from x where anmeldungen.id = x.id returning x.id;
id
----
4
(1 row)
UPDATE 1
Time: 0,466 ms
test=*# with x as (select min(id) as id from anmeldungen where name is null) update anmeldungen set name = 'name5' from x where anmeldungen.id = x.id returning x.id;
id
----
5
(1 row)
UPDATE 1
Time: 0,472 ms
test=*# with x as (select min(id) as id from anmeldungen where name is null) update anmeldungen set name = 'name6' from x where anmeldungen.id = x.id returning x.id;
id
----
(0 rows)
UPDATE 0
Time: 0,419 ms
test=*# with x as (select min(id) as id from anmeldungen where name is null) update anmeldungen set name = 'name7' from x where anmeldungen.id = x.id returning x.id;
id
----
(0 rows)
UPDATE 0
Time: 0,419 ms
test=*# select * from anmeldungen ;
id | name
----+-------
1 | ich
2 | du
3 | name3
4 | name4
5 | name5
(5 rows)
Time: 0,166 ms
test=*#