>PROBLEM
You need to duplicate a table's row copying from a previous one that contains decode binary data that we shal avoid using copy/paste.
>SOLUTION
Notice that in this example, prtkey and pubkey are binary fields using bytea type.
The uptime is a timestamptz not null field.
INSERT INTO keysvc (id,title,pvtkey,pubkey,status,uptime) VALUES( 2, 'ramnode4',null ,null ,1, CURRENT_TIMESTAMP);
with keys as (SELECT pvtkey, pubkey, uptime FROM keysvc where id = 1)
update keysvc set pvtkey=(select pvtkey from keys), pubkey=(select pubkey from keys), uptime=(select uptime from keys) where id =40;
>ENV
PostgreSQL