I am used to do this in MySQL:
INSERT INTO ... SELECT ...
which would lock the table I SELECT
from.
Now, I am trying to do something similar in PostgreSQL, where I select a set of rows in a table, and then I insert some stuff in other tables based on those rows values. I want to prevent having outdated data, so I am wondering how can I lock a SELECT
in PostgresSQL.