From: | Michal Politowski <mpol+pg(at)meep(dot)pl> |
---|---|
To: | |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Inserting boolean types as an alias? |
Date: | 2013-12-03 10:36:53 |
Message-ID: | 20131203103653.GA27846@meep.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2013-12-03 13:54:50 | Re: Trust intermediate CA for client certificates |
Previous Message | Shuwn Yuan Tee | 2013-12-03 10:32:02 | Postgres 9.3 read block error went into recovery mode |