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

From Adrian Klaver
Subject Re: [pgsql-sql] Daily digest v1.3328 (5 messages)
Date
Msg-id 201009221730.14578.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: [pgsql-sql] Daily digest v1.3328 (5 messages)  ("TJ O'Donnell" <tjo@acm.org>)
Responses Re: [pgsql-sql] Daily digest v1.3328 (5 messages)  (David Wilson <david.t.wilson@gmail.com>)
List 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 by date:

Previous
From: "TJ O'Donnell"
Date:
Subject: Re: [pgsql-sql] Daily digest v1.3328 (5 messages)
Next
From: "Nils O. Selåsdal"
Date:
Subject: Re: Can psql show the column type of a result ?