Re: [BUGS] Failure to coerce unknown type to specific type
От | David G. Johnston |
---|---|
Тема | Re: [BUGS] Failure to coerce unknown type to specific type |
Дата | |
Msg-id | CAKFQuwa6LsueyCBfDTi0DrdX16c0Eh5NO67nJp5K=NcDAYyBOQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUGS] Failure to coerce unknown type to specific type (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>) |
Ответы |
Re: [BUGS] Failure to coerce unknown type to specific
type
|
Список | pgsql-hackers |
Hello, I think this is a bug.
The core of this problem is that coerce_type() fails for Var of
type UNKNOWNOID.
The comment for the function says that,
> * The caller should already have determined that the coercion is possible;
> * see can_coerce_type.
But can_coerce_type() should say it's possible to convert from
unknown to any type as it doesn't see the target node type. I
think this as an inconsistency between can_coerce_type and
coerce_type. So making this consistent would be right way.
You have two pieces of contradictory knowledge - how are you picking which one to "fix"?
Concerning only this issue, putting on-the-fly conversion for
unkown nonconstant as attached patch worked for me. I'm not so
confident on this, though..
Confident about what aspect - the safety of the patch itself or whether the conversion is even a good idea?
David J.
В списке pgsql-hackers по дате отправления: