------=_Part_14312_18765828.1207648755649
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Tue, Apr 8, 2008 at 7:54 PM, A B <gentosaker@[EMAIL PROTECTED]
> wrote:
> Hi,
> Is there a way to make postgresql to automatically convert integer
> values to boolean?
>
> Consider
>
> create table x (a boolean);
> insert into x (a) values (1);
>
> the inser fails :-(
> Is there a way to make it work without altering the insert command?
>
>
Creating a custom cast might help you there....
--
Shoaib Mir
Fujitsu Australia Software Technology
shoaibm@[EMAIL PROTECTED]
text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<br><br>
<div class="gmail_quote">On Tue, Apr 8, 2008 at 7:54 PM, A B <<a
href="mailto:gentosaker@[EMAIL PROTECTED]
">gentosaker@[EMAIL PROTECTED]
>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px
0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br>Is there a way to make
postgresql to automatically convert integer<br>values to
boolean?<br><br>Consider<br>
<br>create table x (a boolean);<br>insert into x (a) values
(1);<br><br>the inser fails :-(<br>Is there a way to make it work without
altering the insert command?<br><font
color="#888888"><br></font></blockquote>
<div> </div></div>
<div class="gmail_quote"> </div>
<div class="gmail_quote">Creating a custom cast might help you
there....<br> <br>--<br>Shoaib Mir<br>Fujitsu Australia Software
Technology<br><a
href="mailto:shoaibm@[EMAIL PROTECTED]
">shoaibm@[EMAIL PROTECTED]
></div>
------=_Part_14312_18765828.1207648755649--


|