Error: User 'postgres' not found in aco_user table when trying to update a table



  • Logging into PSQL as follows:

    su postgres
    psql -d database_name
    

    I can view all tables in the database. However, when I update data in a table (UPDATE table set column='blue') I get the following error:

    ERROR:  User: 'postgres' not found in aco_user table
    CONTEXT:  SQL statement "SELECT aco_message1( 'USER_NOT_FOUND', true, current_user )"
    PL/pgSQL function aco_get_current_user_id(boolean) line 8 at PERFORM
    PL/pgSQL function aco_get_current_user_id() line 5 at RETURN
    PL/pgSQL function aco_user_trigger() line 8 at assignment
    

    which prevents me from updating the table.

    What is the issue? Postgres is a superuser who should be able to do everything.

    EDIT: the aco() functions appear to be custom functions created as part of this database, so I guess they are causing the problem. Can I alter this user defined function to accept Postgres as the user?



  • Simple use SET ROLE user to a user that has permission to alter that database (e.g. the owner).


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2