Only if your developers are inexperienced.
1) This is not really a temporary table in the traditional
sense; you're creating a real table and then dropping it.
This has problems with concurrency (you can't have two
"real" tables with the same name), among other issues.
2) Temporary tables in Postgres suck because they bloat
the catalogs. Creating temporary tables regularly is
better avoided.
3) There's no real need to create a table of any kind. A
regular VALUES would do. (Though you might have to encode
some type information into the query.) SELECT u.user, i.text
FROM users u,
LATERAL (SELECT * FROM items WHERE items.user = u.user ORDER BY items.pos DESC LIMIT 3) i;
(You can also make these columns instead of rows, but as someone already pointed out, you'd usually not do that in SQL.)