From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mark Dilger <pgsql(at)markdilger(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: TODO: Fix CREATE CAST on DOMAINs |
Date: | 2006-09-20 17:31:46 |
Message-ID: | 11582.1158773506@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Mark Dilger <pgsql(at)markdilger(dot)com> writes:
> Mark Dilger wrote:
>> Casts from int2 -> int4, int2 -> int8, and int4 -> int8 would all be
>> SAFE, I think, because they are not lossy. But perhaps I have not
>> thought enough about this and these should be IMPLICIT rather than SAFE.
> I have thought about this some more. I think these are indeed SAFE. The
> distinction between SAFE and IMPLICIT should not, I think, be whether the
> storage type is identical, but rather whether there is any possible loss of
> precision, range, accuracy, etc., or whether there is any change in the
> fundamental interpretation of the data when cast from the source to destination
> type.
You are going in exactly the wrong direction --- this line of thought is
aiming to make *more* casts possible by default, which is not what we
need, at least not among the collection of base types.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-09-20 17:37:36 | Re: Lock partitions |
Previous Message | Mark Dilger | 2006-09-20 17:26:55 | Re: TODO: Fix CREATE CAST on DOMAINs |