Re: maxint reached?
От | Tom Lane |
---|---|
Тема | Re: maxint reached? |
Дата | |
Msg-id | 27814.1017781587@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: maxint reached? (Daniel Kalchev <daniel@digsys.bg>) |
Ответы |
Re: maxint reached?
|
Список | pgsql-hackers |
Daniel Kalchev <daniel@digsys.bg> writes: > It turned out to be an query containing "oid = somenumber" called from perl script. Is it possible that the default typeconversion functions do not work as expected? No, but you do have to cast an oversize value to oid explicitly to prevent it from being taken as int4, eg regression=# select oid = 2444444444 from int4_tbl; ERROR: dtoi4: integer out of range regression=# select oid = 2444444444::oid from int4_tbl; << works >> (In releases before about 7.1 you'd have had to single-quote the literal, too.) This is one of a whole raft of cases involving undesirable assignment of types to numeric constants; see past complaints about int4 being used where int2 or int8 was wanted, numeric vs float8 constants, etc etc. We're still looking for a promotion rule that does what you want every time... regards, tom lane
В списке pgsql-hackers по дате отправления: