In my vault_log table there is a column resp_id, the data type is varchar(40) and I want to alter the data type from varchar(40) to uuid but I get this error when trying to do so:
ERROR: invalid input syntax for type UUID:
This is the command I have used:
alter table vault_log
alter column resp_id type uuid using resp_id::uuid;
Table schema:
| Column | Type | Collation | Nullable | Default |
|---|---|---|---|---|
| ac | character varying(20) | not null | ||
| scheme_code | character varying(20) | not null | ||
| req_ts | timestamp without time zone | not null | ||
| res_ts | timestamp without time zone | not null | ||
| resp | character varying(20) | not null | ||
| err | character varying(20) | |||
| resp_id | character varying(40) | not null | ||
| txn | uuid | not null | ||
| client_ip | character varying(20) | |||
| opr | character varying(20) | not null | ||
| vault_id | integer | not null | nextval('vault_log_vault_id_seq'::regclass) | |
| mac_id | character varying |