I'm trying to extract the data from a table to a file with the following command:
COPY historico TO '/home/jessica/teste.txt';
But the following error occurs:
ERROR: could not open file "/home/jessica/teste.txt" for writing: Permission Denied
I'm trying to extract the data from a table to a file with the following command:
COPY historico TO '/home/jessica/teste.txt';
But the following error occurs:
ERROR: could not open file "/home/jessica/teste.txt" for writing: Permission Denied
The user you are accessing the database does not have permission to create the file in / home / jessica /
You can do the following command:
COPY historico TO '/tmp/teste.txt';
In the / tmp directory all system users can access it normally and from there, you manipulate your file.
I hope I have helped.