Symptom

I executed a CREATE ROLE statement to create a standard account named gpuser01 in AnalyticDB for PostgreSQ. However, when I executed a COPY statement to copy a script as the gpuser01 user, the system displayed "ERROR: must be superuser to COPY to or from a file."

How do I promote a standard account to the superuser user?

Solution

  • AnalyticDB for PostgreSQL does not support the superuser user. For more information, see Features and limits.
  • You can copy data to a file by executing:
    psql -c 'copy xx to stdout' > file

    Or

    
    cat file | psql -c 'copy xx from stdin'