Elitmiar
Elitmiar

Reputation: 36909

Trying to modify column type but get error

I'm running this command

alter table client_details alter column name type character varying(120);

but then get the error

ERROR:  syntax error at or near "view" at character 7
LINE 1: alter view v1 alter column name type character varying(120);

I've noticed that a view exists thats causing the problem, how can I alter the type in the vieww, or solve this issue?

Upvotes: 1

Views: 485

Answers (1)

user330315
user330315

Reputation:

Unfortunately PostgreSQL is very strict about this.

You need to drop the view that references that table, then alter the column type and then recreate the view.

Upvotes: 2

Related Questions