Hello, If I create a table mytable
with column data
as varchar(2)
and then insert something like '123'
into the column, postgres will give me an error for Value too long for type.
How can I have Postgres ignore this and truncate the value if necessary?
Also, I do not (when creating the query) know the actual size of the data
column in mytable
so I can't just cast it.