Skip site navigation (1) Skip section navigation (2)

Debugger line numbering is off by one

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Debugger line numbering is off by one
Date: 2012-04-25 10:24:46
Message-ID: 4F97D0EE.7000403@enterprisedb.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
In PostgreSQL 9.1, the line numbering of PL/pgSQL functions was changed
by this commit:

> commit c3a05881de21438a29b6dc721ebd7d1e028a905a
> Author: Robert Haas <rhaas(at)postgresql(dot)org>
> Date:   Mon Aug 2 03:46:54 2010 +0000
>
>     Remove ancient PL/pgsql line numbering hack.
>
>     While this hack arguably has some benefit in terms of making PL/pgsql's
>     line numbering match the programmer's expectations, it also makes
>     PL/pgsql inconsistent with the remaining PLs, making it difficult for
>     clients to reliably determine where the error actually is.  On balance,
>     it seems better to be consistent.
>
>     Pavel Stehule

The hack that was removed skipped an initial newline when counting line 
numbers. The PL/pgSQL debugger has a similar hack, but it didn't get the 
memo that it was removed in the backend, so the green current line 
marker is off by one when connected to a 9.1 server. Attached is a patch 
to fix that.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Attachment: fix-debugger-linenumbering-on-91.patch
Description: text/x-diff (7.4 KB)

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2012-04-25 11:22:34
Subject: Re: Debugger line numbering is off by one
Previous:From: Thom BrownDate: 2012-04-25 07:27:12
Subject: Re: Incorrect domain logic for 9.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group