Re: COALESCE and NULLIF semantics
От | Sam Mason |
---|---|
Тема | Re: COALESCE and NULLIF semantics |
Дата | |
Msg-id | 20090909210003.GN5407@samason.me.uk обсуждение исходный текст |
Ответ на | Re: COALESCE and NULLIF semantics (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: COALESCE and NULLIF semantics
|
Список | pgsql-hackers |
On Wed, Sep 09, 2009 at 10:25:34AM -0400, Tom Lane wrote: > Now admittedly there's probably not any major technical obstacle to > making a runtime conversion happen --- it's merely delayed invocation of > the destination type's input function. But I find it really ugly from a > theoretical point of view. Doing calculations with "unknown" values > just seems wrong. It's pretty grim. This seems to be some strange halfway house on the way to real type-inference, with broken semantics to boot. How would it prevent weirdos like: SELECT 'msg'||v, date_trunc('year',v), v+10 FROM (SELECT 'hi ho') x(v); If Kevin wants something like this it should either be real type-inference or leave it as it is. The problem is that each variable should have exactly one type, type inference lets you delay finding that type until later down the tree and then back-propagate it back up again. Your suggestions seems to allow variables to have as many types as it wants. -- Sam http://samason.me.uk/
В списке pgsql-hackers по дате отправления: