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 191F69DCCCF; Mon, 13 Mar 2006 11:57:06 -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 74577-05; Mon, 13 Mar 2006 11:57:11 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D2F859DCCEF; Mon, 13 Mar 2006 11:57:03 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k2DFv75O007694; Mon, 13 Mar 2006 10:57:07 -0500 (EST) To: Alvaro Herrera cc: Michael Glaesemann , pgsql-patches@postgreSQL.org, pgsql-interfaces@postgreSQL.org Subject: Re: Proposed p.tch for error locations In-reply-to: <20060313153209.GA15002@surnet.cl> References: <5114.1142185055@sss.pgh.pa.us> <7274.1142262691@sss.pgh.pa.us> <20060313153209.GA15002@surnet.cl> Comments: In-reply-to Alvaro Herrera message dated "Mon, 13 Mar 2006 11:32:09 -0400" Date: Mon, 13 Mar 2006 10:57:07 -0500 Message-ID: <7693.1142265427@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.112 required=5 tests=[AWL=0.112] X-Spam-Score: 0.112 X-Spam-Level: X-Archive-Number: 200603/11 X-Sequence-Number: 6067 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. Basically what's at stake here is the behavior of "dumb" applications that are just using PQerrorMessage and not doing anything smart with error message fields. It does not seem unreasonable to me to assume fixed-width font in that context. We haven't seen any complaints about psql doing it have we? regards, tom lane