select_for_update() …
"Returns a queryset that will lock rows until the end of the
transaction, generating a SELECT ... FOR UPDATE SQL statement on
supported databases."
Postgresql handles this …
"If specific tables are named in FOR UPDATE or FOR SHARE, then only
rows coming from those tables are locked; any other tables used in the
SELECT are simply read as usual. A FOR UPDATE or FOR SHARE clause
without a table list affects all tables used in the statement. If FOR
UPDATE or FOR SHARE is applied to a view or sub-query, it affects all
tables used in the view or sub-query."
http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-FOR-UPDATE-SHARE
Django doesn't specify any tables when it generates a SELECT … FOR UPDATE query:
https://github.com/django/django/blob/master/django/db/backends/__init__.py#L585
Hope that helps
Tom