On 20 February 2012 23:16, Peter Geoghegan <pe...@2ndquadrant.com> wrote: > Clearly this change is a quick and dirty workaround, and something > better is required. The question I'd pose to the maintainer of this > code is: what business does the coerce_to_target_type call have > changing the location of the Const node resulting from coercion under > the circumstances described? I understand that the location of the > CoerceToDomain should be at "CAST", but why should the underlying > Const's position be the same?
Another look around shows that the CoerceToDomain struct takes its location from the new Const location in turn, so my dirty little hack will break the location of the CoerceToDomain struct, giving an arguably incorrect caret position in some error messages. It would suit me if MyCoerceToDomain->arg (or the "arg" of a similar node related to coercion, like CoerceViaIO) pointed to a Const node with, potentially, and certainly in the case of my original CoerceToDomain test case, a distinct location to the coercion node itself. Can we do that? -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers