This question is related to my previous one here
In SQL Server, I could get the lock type from a specific database using the code below:
SELECT request_mode FROM sys.dm_tran_locks WHERE resource_database_id = DB_ID() AND resource_associated_entity_id = OBJECT_ID(N'dbo.cars');
In Postgres 11, how to filter the pg_locks
result to a specific database like how SQL Server's resource_database_id = DB_ID() AND resource_associated_entity_id = OBJECT_ID(N'dbo.cars')
works?
Thanks