is this possible in plpgsql ?

Поиск
Список
Период
Сортировка
От Marcin Winkler
Тема is this possible in plpgsql ?
Дата
Msg-id 20030619023832.2fe7ac5b.qurczak@wolomin.biz
обсуждение исходный текст
Ответы Re: is this possible in plpgsql ?  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
I have 1 function in pg 7.3.2.

txt string have 1,2,3,.. and i would like to be similar like if 3 in
(1,2,3..) then, but IF 3 in (''''||txt||'''') THEN doesn't work.
There is possible to this or not ?

CREATE OR REPLACE FUNCTION rek2(INT8) RETURNS text AS '
DECLARE       i                       INT8;
BEGIN       txt := '''';       for i in 1 .. 10 loop               txt := txt||i||'','';       END loop;       txt :=
txt||''0'';      IF 3 in (''''||txt||'''') THEN               raise notice ''yep'';       END IF;       RETURN txt; 
END;
' LANGUAGE 'plpgsql';

--
"Nieobecni nie mają racji"

Marcin Winkler


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

Предыдущее
От: Guy Fraser
Дата:
Сообщение: Re: [GENERAL] Request for advice: Table design
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: is this possible in plpgsql ?