ERROR: must be superuser or a member of the pg_read_server_files role to COPY from a file without SUPERUSER privileges

When executing the postgres copy command in a terminal, postgres shows the following error:

Solution, without needing to assign the role of SUPERSUSER to the user: 1. Connect to a psql session with the command.

2. Execute the command \COPY as follow:

 

Read More

postgres install extensions (pgcrypto) without giving the application superuser rights

In this example, I’m going to install the pgcrypto extension to be able to generate UUID data type. Procedure 1. Access as Postgres superuser. By default, it is the postgres user.

2. Access to the database using the super user (postgres).

3. Lista all the databases to identify the database we want to […]

Read More