X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7CF5B9DCC69; Mon, 13 Mar 2006 12:03:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75570-07; Mon, 13 Mar 2006 12:03:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by postgresql.org (Postfix) with ESMTP id 884929DCCCF; Mon, 13 Mar 2006 12:03:37 -0400 (AST) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 13 Mar 2006 12:03:37 -0400 X-IronPort-AV: i="4.02,187,1139194800"; d="scan'208"; a="46102877:sNHT34480892" Received: from alvh.no-ip.org (201.221.200.21) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43A978FD00A297BB; Mon, 13 Mar 2006 12:03:36 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 0A744C3A2BE; Mon, 13 Mar 2006 12:03:36 -0400 (CLT) Date: Mon, 13 Mar 2006 12:03:35 -0400 From: Alvaro Herrera To: Tom Lane Cc: Michael Glaesemann , pgsql-patches@postgreSQL.org, pgsql-interfaces@postgreSQL.org Subject: Re: Proposed p.tch for error locations Message-ID: <20060313160335.GN8274@surnet.cl> Mail-Followup-To: Tom Lane , Michael Glaesemann , pgsql-patches@postgreSQL.org, pgsql-interfaces@postgreSQL.org References: <5114.1142185055@sss.pgh.pa.us> <7274.1142262691@sss.pgh.pa.us> <20060313153209.GA15002@surnet.cl> <7693.1142265427@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7693.1142265427@sss.pgh.pa.us> User-Agent: Mutt/1.5.11+cvs20060126 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.558 required=5 tests=[AWL=-0.361, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 1.558 X-Spam-Level: * X-Archive-Number: 200603/13 X-Sequence-Number: 6069 Tom Lane wrote: > Alvaro Herrera writes: > > This doesn't work on terminal using a variable-width font, does it? > > Sure, you can have all the interfaces use a monospace font, but it seems > > a weird thing to do. I think the line/character position should be > > returned in a separate error attribute in ereport. So for example > > pgAdmin could count characters and mark it in bold or use a different > > color. > > That information is already available to pgAdmin, and has been since > 7.4; if they are failing to exploit it that's their problem not libpq's. Aye, that's fine. I don't really know if pgAdmin uses the info or not. I thought the proposal to remove the "at character N" in the error message meant that the only way to get that information would be from the "LINE Y: ...\n[some whitespace]^" message, which would be pretty cumbersome. But if there already is a field in the error message for the position, then nothing is lost. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.