From: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
---|---|
To: | Chris Travers <chris(at)travelamericas(dot)com> |
Cc: | Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: 0/1 vs true/false |
Date: | 2003-07-23 07:57:52 |
Message-ID: | Pine.LNX.4.21.0307230855460.5607-100000@ponder.fairway2k.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I had do do this sort of thing for a some developers. It was actually 'true'
and 'false' that was wanted not the 0/1. I wrote a little plgsql function and
installed it as a cast to text.
--
Nigel J. Andrews
On Wed, 23 Jul 2003, Chris Travers wrote:
> I ran into this problem some time ago. I ended up using a query with a
> CASE statement in it to caste the boolean as a 1 or 0. I guess one could
> do this as a view as well.
>
> Jean-Christian Imbeault wrote:
>
> > Just having a small argument with an application developer ...
> >
> > is using 0/1 for boolean types SQL compliant? I am trying to convince
> > him that the proper SQL compliant (and postgresql compliant) syntax is
> > true/false but he won't budge ...
> >
> > The app as currently written no longer works with postgres because
> > they code uses 0/1 instead of the now enforced true/false for boolean
> > types.
> >
> > Can someone point me to an SQL spec and section where this is clearly
> > stated out?
> >
> > Thanks,
> >
> > Jean-Christian Imbeault
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Christian Imbeault | 2003-07-23 07:59:55 | Re: 0/1 vs true/false |
Previous Message | nolan | 2003-07-23 07:52:28 | Re: dump_all/restore times? |