obtuse plpgsql function needs

Поиск
Список
Период
Сортировка
От Robert Treat
Тема obtuse plpgsql function needs
Дата
Msg-id 1058913112.22259.271.camel@camel
обсуждение исходный текст
Ответы Re: obtuse plpgsql function needs  (Josh Berkus <josh@agliodbs.com>)
Re: obtuse plpgsql function needs  (elein <elein@varlena.com>)
Re: obtuse plpgsql function needs  (greg@turnstep.com)
Список pgsql-sql
given 

create table t1 (f,f1,f2,f3);
create table t2 (f,f4,f5,f6);

i'm trying to create a function concat() that does something like:

select f,concat() as info from t1;

which returns a result set equivalent to:
select f,('f1:' || f1 || '- f2:' || f2 || '- f3:' || f3) as x from t1;

or
select f,concat() as info from t2;
returns equivalent

select f,('f4:' || f4 || ' - f5:' || f5 || ' - f6:' || f6) as x from t2;


I'm starting to believe this is not possible, has anyone already done
it? :-)

Robert Treat
-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: min() and NaN
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: obtuse plpgsql function needs