Question

I receive the following error when performing a query in Postgres:

column "action" is of type schemaname.enum_rights_actions but expression is of type enum_rights_actions

Is this a schema related issue?

alter database postgres set search_path=schemaname doesn't help.

Was it helpful?

Solution

Workaround. The original definition of the table was:

CREATE TABLE rights_history(
    ...,
    action schemaname.enum_rights_actions,
    ...
);

I changed the definition of the table by removing the prepended schema name:

CREATE TABLE rights_history(
    ...,
    action enum_rights_actions,
    ...
);

That helped. DDL SQL was generated using pgmodeler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top