Jeevan Chalke <jeevan.cha...@enterprisedb.com> writes: > Patch looks excellent now. No issues. > Found a typo which I have fixed in the attached patch.
Starting to look at this ... The business with numbering lines from SELECT seems to me to be completely nonsensical. In the first place, it fails to allow for views containing WITH clauses. But really it looks like it was cargo-culted over from \ef/\sf without understanding why those commands number lines the way they do. The reason they do that is that for errors occurring inside a function definition, the PL will typically report a line number relative to the function body text, and so we're trying to be helpful about interpreting line numbers of that kind. But there's no comparable behavior in the case of a view. If you fat-finger a view, you'll get a line number relative to the text of the whole CREATE command, eg regression=# create or replace view z as regression-# select 1/col regression-# from bar; ERROR: relation "bar" does not exist LINE 3: from bar; ^ So AFAICS, \ev and \sv should just number lines straightforwardly, with "1" being the first line of the CREATE command text. Am I missing something? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers