Database column contains merge data in text column.
Expressions are between << and >> separators.
How to replace them with database values ?
For example, code below should return:
Hello Tom Lane!
How to implement textmerge procedure or other idea ?
Andrus.
create temp table person ( firstname text, lastname text ) on commit drop;
insert into person values ('Tom', 'Lane');
create temp table mergedata ( template text ) on commit drop;
insert into mergedata values ('Hello <<firstname||'' ''||lastname>>!');
select textmerge(template,'select * from person') from mergedata;