0

I am running a DDL statement like this in Postgres 11

ALTER SEQUENCE kwt.VisitReport_seq OWNED BY kwt.VisitReport;

I am running it as DBADMIN.

Yet I get some weird error:

SQL Error [42P01]: ERROR: relation "kwt" does not exist ERROR: relation "kwt" does not exist ERROR: relation "kwt" does not exist

But this is strange... kwt is not a relation, it is a schema.

What is going on?!

1 Answer 1

1

As often happens right after posting here I found the problem.

The statement should be:

ALTER SEQUENCE kwt.VisitReport_seq OWNED BY kwt.VisitReport.ID;

i.e. it should refer (of course) to the column name, not to the table name.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.