Re: Inserting boolean types as an alias? - Mailing list pgsql-general

From Michal Politowski
Subject Re: Inserting boolean types as an alias?
Date
Msg-id 20131203103653.GA27846@meep.pl
Whole thread Raw
In response to Inserting boolean types as an alias?  (Nick <ngalewski@gmail.com>)
List pgsql-general
On Mon,  2 Dec 2013 15:46:17 -0800, Nick wrote:
[...]
> This is what I have currently for the line that I am specifically talking
> about:
>
> INSERT INTO club_Games(memberID, gameID, hardwareID, count, status)
>      VALUES    ((SELECT memberID FROM members WHERE name = 'Fred Flinstone'),
> (SELECT gameID FROM games WHERE name = 'Jurrasic Park'), NULL, 1, 'true');
>
> when I do the SELECT * FROM club_Games this is my output:
>
> id     gameid        memberid      hardwareid            count
> status
> 1   12345zzzzz       A12345           <null>               1
> t
>
> Where it says t for status I wanted it to say available but mean true for
> boolean, but I don't know how to do that. Thanks to all for help.

Alternate suggestion: If you want to use a boolean column here,
maybe you could consider naming the column "available", not "status".

id     gameid        memberid      hardwareid    count     available
1      12345zzzzz    A12345        <null>        1         t

--
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.


pgsql-general by date:

Previous
From: "Francisco Figueiredo Jr."
Date:
Subject: Re: NpgsqlCopySerializer blows up if no rows are saved
Next
From: Vasily Soshnikov
Date:
Subject: Dynamic configuration via LDAP in postmaster