Re: inserting boolean values in dynamic queries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: inserting boolean values in dynamic queries
Дата
Msg-id 16326.1221741347@sss.pgh.pa.us
обсуждение исходный текст
Ответ на inserting boolean values in dynamic queries  ("Raphael Bauduin" <rblists@gmail.com>)
Ответы Re: inserting boolean values in dynamic queries  ("Raphael Bauduin" <rblists@gmail.com>)
Список pgsql-sql
"Raphael Bauduin" <rblists@gmail.com> writes:
> EXECUTE 'UPDATE tbl SET '
>         || quote_ident(colname)
>         || ' = '
>         || quote_literal(newvalue)
>         || ' WHERE key = '
>         || quote_literal(keyvalue);

> It works fine, except when I want to include a boolean value: the cast
> of newvalue from boolean to text causes problem.

What problem?  'true' and 'false' are accepted as input for boolean
AFAICS.
        regards, tom lane


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

Предыдущее
От: "Rafael Domiciano"
Дата:
Сообщение: Re: Doubts about FK
Следующее
От: "Raphael Bauduin"
Дата:
Сообщение: Re: inserting boolean values in dynamic queries