How to perform text merge

Поиск
Список
Период
Сортировка
От Andrus
Тема How to perform text merge
Дата
Msg-id 609BF3CE079445569FC0D047A5C816AD@andrusnotebook
обсуждение исходный текст
Ответы Re: How to perform text merge
Список pgsql-general
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;


В списке pgsql-general по дате отправления:

Предыдущее
От: "Andrus"
Дата:
Сообщение: Splitting text column to multiple rows
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Splitting text column to multiple rows