On Mon, Feb 27, 2012 at 4:26 AM, Peter Geoghegan <pe...@2ndquadrant.com> wrote: > This does not appear to have any user-visible effect on caret position > for all variations in coercion syntax, while giving me everything that > I need. I had assumed that we were relying on things being this way, > but apparently this is not the case. The system is correctly blaming > the coercion token when it finds the coercion is at fault, and the > const token when it finds the Const node at fault, just as it did > before. So this looks like a case of removing what amounts to dead > code.
To shed some light on that hypothesis, attached is a patch whereby I use 'semantic analysis by compiler error' to show the extent of the reach of the changes by renaming (codebase-wide) the Const node's location symbol. The scope whereby the error token will change position is small and amenable to analysis. I don't see a problem, nor wide-reaching consequences. As Peter says: probably dead code. Note that the cancellation of the error position happens very soon, after an invocation of stringTypeDatum (on two sides of a branch). Pre and post-patch is puts the carat at the beginning of the constant string, even in event there is a failure to parse it properly to the destined type. -- fdr
Description: Binary data
-- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers