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 7AA559DCD3F; Mon, 13 Mar 2006 11:32:09 -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 69391-05; Mon, 13 Mar 2006 11:32:13 -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 D00269DCD36; Mon, 13 Mar 2006 11:32:05 -0400 (AST) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 13 Mar 2006 11:32:10 -0400 X-IronPort-AV: i="4.02,187,1139194800"; d="scan'208"; a="46097704:sNHT18578916" Received: from alvh.no-ip.org (201.221.200.21) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43A978FD00A284CE; Mon, 13 Mar 2006 11:32:09 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id C5674C3A2BE; Mon, 13 Mar 2006 11:32:09 -0400 (CLT) Date: Mon, 13 Mar 2006 11:32:09 -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: <20060313153209.GA15002@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7274.1142262691@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.561 required=5 tests=[AWL=-0.358, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 1.561 X-Spam-Level: * X-Archive-Number: 200603/10 X-Sequence-Number: 6066 Tom Lane wrote: > The change in behavior would actually be in libpq, because it's > PQerrorMessage that is doing the deed (assuming a reasonably modern > server and libpq). What I was considering proposing was that we migrate > the error-cursor feature out of psql and into PQerrorMessage. This > would mean that you'd get responses like > > ERROR: column "foo" does not exist > LINE 1: select foo from a; > ^ 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. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.