pgloader
pgloader copied to clipboard
SET ROLE
I connect to my target database with role X, which has login enabled, and then I execute "SET ROLE Y" in order to write, as only role Y has write permissions (and login is disabled for Y). How can I achieve that with pgloader? If I write
BEFORE LOAD DO $$ set role Y; $$
it doesn't work. I guess that pgloader closes the connection with the target database, gets the data from the source database and connects again to the target database. Is there any solution?
Thanks