fb 5.0.2.
When using aliases for old.field in UPDATE OR INSERT, we encounter the error: conversion error from string “999”. This error only occurs when the value is longer than 1 character and the value already exists in the table via MATCHING (i.e., old.value is not null).
The issue occurs specifically with old.t_key as o, while new works correctly. Using CAST helps resolve the issue.
(returning cast(old.t_key as int) as o, new.t_key as n)
This issue was not present in Firebird version 3.10.
CREATE DOMAIN PKEY_test AS INTEGER NOT NULL;
CREATE TABLE test_pkey (
t_key PKEY_test,
CONSTRAINT pk PRIMARY KEY (t_key)
);
UPDATE OR INSERT INTO test_pkey (t_key)
VALUES (999)
MATCHING (t_key)
RETURNING old.t_key as o, new.t_key as n
fb 5.0.2.
When using aliases for old.field in UPDATE OR INSERT, we encounter the error: conversion error from string “999”. This error only occurs when the value is longer than 1 character and the value already exists in the table via MATCHING (i.e., old.value is not null).
The issue occurs specifically with old.t_key as o, while new works correctly. Using CAST helps resolve the issue.
(returning cast(old.t_key as int) as o, new.t_key as n)This issue was not present in Firebird version 3.10.