pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

SET ROLE

Open carlesalbasboix opened this issue 2 years ago • 0 comments

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

carlesalbasboix avatar Aug 01 '22 21:08 carlesalbasboix