Re: is this possible in plpgsql ?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: is this possible in plpgsql ?
Дата
Msg-id 200306191923.24885.dev@archonet.com
обсуждение исходный текст
Ответ на is this possible in plpgsql ?  (Marcin Winkler <qurczak@wolomin.biz>)
Список pgsql-sql
On Thursday 19 Jun 2003 1:38 am, Marcin Winkler wrote:
> 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 ?

>         txt := '''';
>         for i in 1 .. 10 loop
>                 txt := txt||i||'','';
>         END loop;
>         txt := txt||''0'';
>         IF 3 in (''''||txt||'''') THEN
>                 raise notice ''yep'';

Try something like:
 query:=''SELECT 3 in ('' || txt || '')'' EXECUTE query;

Then check the result for true/false

--  Richard Huxton


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

Предыдущее
От: Marcin Winkler
Дата:
Сообщение: is this possible in plpgsql ?
Следующее
От: Paul Thomas
Дата:
Сообщение: Re: [JDBC] maxconnection