Re: dynmic column names inside trigger?

Поиск
Список
Период
Сортировка
От Louis-David Mitterrand
Тема Re: dynmic column names inside trigger?
Дата
Msg-id 20071123170611.GA31463@apartia.fr
обсуждение исходный текст
Ответ на Re: dynmic column names inside trigger?  ("Bart Degryse" <Bart.Degryse@indicator.be>)
Ответы Re: dynmic column names inside trigger?
Re: dynmic column names inside trigger?
Список pgsql-sql
On Wed, Nov 21, 2007 at 09:14:14AM +0100, Bart Degryse wrote:
> I would do something like this (not tested, but conceptually working):
>  
> CREATE or replace FUNCTION sanitize_text(webtext IN text, cleantext OUT text) AS
> $body$
> BEGIN
> cleantext = translate(webtext, E'\x92\x96', '''-');
> cleantext = regexp_replace(cleantext, E'\x9c', 'oe', 'g');
> cleantext = regexp_replace(cleantext, E'\x85', '...', 'g');
> END;
> $body$
> LANGUAGE plpgsql VOLATILE RETURNS NULL ON NULL INPUT;

Hi, 

I was curious as to why you created this function with a prototype of 
func(intext IN text, outtext OUT text) ... returns NULL

instead of the usual
func(intext text) ... returns TEXT 

Is that a more efficient way?


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

Предыдущее
От: "Sabin Coanda"
Дата:
Сообщение: Re: Aleatory exception - found cause
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: dynmic column names inside trigger?