The fact that GetSchema is creating a new connection instead re-using the current connection is causing some headaches due to a specific configuration that my company is attempting to use.
Our connections are being established with one user, and then using "SET ROLE" to elevate the user to a different role that has access to more tables. The issue comes into play because since a new connection is created instead of re-using the current connection it is not receiving these elevated permissions and therefore GetSchema does not produce the expected results.
Is there a specific reason why GetSchema creates a new connection even if the current NpgsqlConnection instance on which the method is called is already connected to the database?
The fact that GetSchema is creating a new connection instead re-using the current connection is causing some headaches due to a specific configuration that my company is attempting to use.
Our connections are being established with one user, and then using "SET ROLE" to elevate the user to a different role that has access to more tables. The issue comes into play because since a new connection is created instead of re-using the current connection it is not receiving these elevated permissions and therefore GetSchema does not produce the expected results.
Is there a specific reason why GetSchema creates a new connection even if the current NpgsqlConnection instance on which the method is called is already connected to the database?