I have composite type in postgres
composite_type(numeric(10, 2), numeric(10, 3))
Table example
id(serial) | comp(composite_type[]) |
---|---|
... | ... |
I need to alter first attribute to numeric(12, 2). If I try to alter type manually, i have error:
Type can't be alter because it used in column
How I can alter this type without data loss?
P.S. I use doctrine and symfony
- I try to alter type as in documentation
- May be I need to create new type, then cast my column to it and then delete old type and rename new, but I don't know how to cast array of composite type.