CREATE TABLE trs (
    wallet_id INT, 
    amount DECIMAL(12, 2), 
    hash BYTEA GENERATED ALWAYS AS (sha256((wallet_id + amount) :: TEXT :: BYTEA)) STORED
)из конкатенированный строки wallet_id + hash
CREATE TABLE trs (
    wallet_id INT, 
    amount DECIMAL(12, 2), 
    hash BYTEA GENERATED ALWAYS AS (sha256((wallet_id :: TEXT || amount :: TEXT) :: BYTEA)) STORED
)