Automatic type conversion
Automatic type conversion
От:
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Дата:
I've got binary operators working with automated type conversion, at
least for some cases:
tgl=> select 2.0 > 1;
?column?
--------
t
(1 row)
However, I'll need to revisit the search algorithms for matching
possible types to functions and operators; I'm pretty sure that the best
algorithm (or even the minimally acceptable one) isn't in there yet.
On to target type matching...
- Tom
Re: [HACKERS] Automatic type conversion
От:
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Дата:
> On to target type matching...
Ooh. This one was easy, apparently:
tgl=> create table test (s smallint);
CREATE
Old behavior:
tgl=> insert into test select 1 + 2;
ERROR: parser: attribute 's' is of type 'int2' but expression is of
type 'int4'
New behavior:
tgl=> insert into test select 1 + 2;
INSERT 18432 1
tgl=> select * from test;
s
-
3
(1 row)
Back to fixing broken stuff in operators...
- Tom