Postgres не поддерживает (начиная с версии 11) виртуальный столбец / производный столбец.
Вместо этого вы можете создать представление.
CREATE OR replace VIEW v_names
AS
SELECT firstname,
middlename,
lastname,
firstname
||CASE
WHEN nullif(middlename, '') IS NULL THEN ''
ELSE ' '
||middlename
END
||CASE
WHEN nullif(lastname, '') IS NULL THEN ''
ELSE ' '
||lastname
END AS FullName
FROM names;
knayak=# INSERT INTO names(FirstName,MiddleName,LastName) VALUES ( 'John', 'Maynard','Keynes');
INSERT 0 1
knayak=# INSERT INTO names(FirstName,MiddleName,LastName) VALUES ( 'John','','Doe');
INSERT 0 1
knayak=# select * from v_names;
firstname | middlename | lastname | fullname
-----------+------------+----------+---------------------
John | Maynard | Keynes | John Maynard Keynes
John | | Doe | John Doe