From: | Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com> |
---|---|
To: | "Max Ueda" <mhanzo(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Coercion in PGSQL? |
Date: | 2007-01-16 17:18:00 |
Message-ID: | 92869e660701160918t706d5e6dg3fa71d86c03654d9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2007/1/16, Max Ueda <mhanzo(at)yahoo(dot)com>:
> Hi,
>
> I've been wondering with some wrong results that are
> being returned from some functions in my application.
> Basically, they are algebraic functions dealing with
> int values.
>
> Some results made me think of coercion between int
> types. For example, atributing a int8 value into a
> int2 variable. Does it really happen (coercion)? Is
> the int8 value automatically converted into int2, or
> an error should be returned in that case?
>
AFAIK, the coercion does occur when needed but it gives a clear error
message when appropriate. I mean simple situations like
CREATE TABLE test ( i4 INT4, i8 INT8 );
insert into test ( i8 ) select 99999999999999999;
update test set i4 = i8;
ERROR: integer out of range
Could you perhaps give an example of your problem?
--
Filip Rembiałkowski
From | Date | Subject | |
---|---|---|---|
Next Message | Furesz Peter | 2007-01-16 17:35:56 | trigger question |
Previous Message | Max Ueda | 2007-01-16 17:17:06 | Re: Coercion in PGSQL? |