On 13/02/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Anton Melser" <[EMAIL PROTECTED]> writes:
> ERROR: operator is not unique: boolean = integer
> I get this whether castcontext is 'a' or 'i'.
If you make both cast directions the same priority then the system has
no basis for choosing bool = bool
"Anton Melser" <[EMAIL PROTECTED]> writes:
> ERROR: operator is not unique: boolean = integer
> I get this whether castcontext is 'a' or 'i'.
If you make both cast directions the same priority then the system has
no basis for choosing bool = bool over int = int or vice versa. Try
making one dire
On 12/02/07, Anton Melser <[EMAIL PROTECTED]> wrote:
> I think actually what he needs is what Peter suggested upthread, namely
> to weaken the context-restriction on the int-to-bool cast.
Indeed... Peter's suggestion seems to have solved all my problems. So
even though it probably shows just how
I think actually what he needs is what Peter suggested upthread, namely
to weaken the context-restriction on the int-to-bool cast.
Indeed... Peter's suggestion seems to have solved all my problems. So
even though it probably shows just how embarrassingly bad my sql is...
update pg_cast set cast
On Mon, 2007-02-12 at 09:09 +0100, Anton Melser wrote:
> In my searching I did turn up a comment (maybe from you even!) about
> how it wouldn't work (before at least). I guess my problem is that
> there is a body of sql that can't be changed, or at least the other
> devs aren't interested enough in
Shane Ambler <[EMAIL PROTECTED]> writes:
> If you look at the bool type you will find it calls a function called
> boolout(bool) which returns a cstring to return the data for the boolean
> - you could replace this with your own function that returns a 1 or 0
> instead of true or false. Similarl
Anton Melser wrote:
On 12/02/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Joshua D. Drake" <[EMAIL PROTECTED]> writes:
> Anton Melser wrote:
>> Is there any way
>> to force pg to accept 1 and 0 for boolean?
> postgres=# insert into bool_test values(1::boolean);
> INSERT 166968558 1
> postgres=# ins
On 12/02/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Joshua D. Drake" <[EMAIL PROTECTED]> writes:
> Anton Melser wrote:
>> Is there any way
>> to force pg to accept 1 and 0 for boolean?
> postgres=# insert into bool_test values(1::boolean);
> INSERT 166968558 1
> postgres=# insert into bool_test va
"Joshua D. Drake" <[EMAIL PROTECTED]> writes:
> Anton Melser wrote:
>> Is there any way
>> to force pg to accept 1 and 0 for boolean?
> postgres=# insert into bool_test values(1::boolean);
> INSERT 166968558 1
> postgres=# insert into bool_test values(0::boolean);
> INSERT 166968559 1
Possibly An
Anton Melser wrote:
> Hi,
> I am trying to port an app to postgres and have come up against a most
> annoying problem. The app works with both mysql and sqlserver, who
> both seem to have a bit datatype instead of a proper boolean like pg.
> Alas, pg won't accept 1 and 0 for boolean... and npgsql w
Phil Endecott wrote:
> > Is there any way to force pg to accept 1 and 0 for boolean?
>
> There is something called "create cast ... without function" which
> /might/ do what you want.
No, it won't, mainly because int and boolean are not binary compatible.
--
Peter Eisentraut
http://developer.post
Is there any way to force pg to accept 1 and 0 for boolean?
There is something called "create cast ... without function" which
/might/ do what you want.
Phil.
---(end of broadcast)---
TIP 4: Have you searched our list archives?
Anton Melser wrote:
> Is there any way to force pg to accept 1 and 0 for boolean?
You can tweak the context for the cast between int and boolean. Read up
about the pg_cast system catalog.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---(end of broadcast
Hi,
I am trying to port an app to postgres and have come up against a most
annoying problem. The app works with both mysql and sqlserver, who
both seem to have a bit datatype instead of a proper boolean like pg.
Alas, pg won't accept 1 and 0 for boolean... and npgsql won't convert
my numeric(1) in
14 matches
Mail list logo