PostgreSQL

PgSQL: Cannot Alter Character Length because of Dependant Views

 

SQL error:

ERROR:  cannot alter type of a column used by a view or rule
DETAIL:  rule _RETURN on view rv_warehouseprice depends on column "sku"

In statement:
ALTER TABLE “adempiere”.”m_product” ALTER COLUMN “sku” TYPE character varying(50)

I’ve read some documentation and the only apparent solution is to delete all the related views and then recreate them. Which seems crazy as I have over 50 views related to this field…

Leave a Reply

Your email address will not be published. Required fields are marked *