Re: [pgsql-sql] Daily digest v1.3328 (5 messages)

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: [pgsql-sql] Daily digest v1.3328 (5 messages)
Дата
Msg-id 201009221730.14578.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: [pgsql-sql] Daily digest v1.3328 (5 messages)  ("TJ O'Donnell" <tjo@acm.org>)
Ответы Re: [pgsql-sql] Daily digest v1.3328 (5 messages)  (David Wilson <david.t.wilson@gmail.com>)
Список pgsql-general
On Wednesday 22 September 2010 5:12:45 pm TJ O'Donnell wrote:
> Many frameworks do not natively recognize "t" as true and "f" as false.
> I'm using php, json_encode and extjs.
> Is it possible to cause the default output of boolean values to be
> something other than "t" and "f", say "true" and "false" or even 1 and 0?
> Of course I can do this for an individual query using appropriate
> functions, but it would help me to be able to modify the default behavior.
>
> TJ

From here;

http://www.postgresql.org/docs/8.4/interactive/datatype-boolean.html

Valid literal values for the "true" state are:

TRUE
't'
'true'
'y'
'yes'
'on'
'1'

For the "false" state, the following values can be used:

FALSE
'f'
'false'
'n'
'no'
'off'
'0'

--
Adrian Klaver
adrian.klaver@gmail.com

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

Предыдущее
От: "TJ O'Donnell"
Дата:
Сообщение: Re: [pgsql-sql] Daily digest v1.3328 (5 messages)
Следующее
От: "Nils O. Selåsdal"
Дата:
Сообщение: Re: Can psql show the column type of a result ?