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

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: "TJ O'Donnell" <tjo(at)acm(dot)org>
Subject: Re: [pgsql-sql] Daily digest v1.3328 (5 messages)
Date: 2010-09-23 00:30:14
Message-ID: 201009221730.14578.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wilson 2010-09-23 00:40:55 Re: [pgsql-sql] Daily digest v1.3328 (5 messages)
Previous Message TJ O'Donnell 2010-09-23 00:12:45 Re: [pgsql-sql] Daily digest v1.3328 (5 messages)