Re: Proposal for resolving casting issues
От | Bruce Momjian |
---|---|
Тема | Re: Proposal for resolving casting issues |
Дата | |
Msg-id | 200209171914.g8HJEfW07696@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Proposal for resolving casting issues (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Proposal for resolving casting issues
|
Список | pgsql-hackers |
Tom Lane wrote: > Note that if you write, say, > set numericcol = numericcol * 3.14159; > my proposal would do the "right thing" since the constant would be typed > as numeric to start with and would stay that way. To do what you want > with a float variable, it'd be necessary to write > set numericcol = numericcol * float4col::numeric; > which is sort of ugly; but no uglier than > set float4col = float4col * numericcol::float4; > which is what you'd have to write if the system preferred numeric and > you wanted the other behavior. I need a clarification. In the non-assignment case, does: WHERE numericcol = numericcol * 3.14159 evaluate "numericcol * 3.14159" as a numeric? And does: WHERE 5.55 = numericcol * 3.14159 evaluate "numericcol * 3.14159" as a numeric too? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-hackers по дате отправления: