Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WwkEh-0003tv-0g for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jun 2014 03:39:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WwkEf-000331-F0 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jun 2014 03:39:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WwkEc-00032q-Vh for pgsql-hackers@postgresql.org; Tue, 17 Jun 2014 03:38:59 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WwkEV-0006lZ-IZ for pgsql-hackers@postgresql.org; Tue, 17 Jun 2014 03:38:57 +0000 Received: from nara.local (p1021-ipngn4101marunouchi.tokyo.ocn.ne.jp [153.129.158.21]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0M1uF5-1Wc30a28JX-00u25d; Tue, 17 Jun 2014 05:38:23 +0200 Message-ID: <539FB827.3070905@2ndquadrant.com> Date: Tue, 17 Jun 2014 12:38:15 +0900 From: Ian Barwick User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Peter Geoghegan CC: Tom Lane , Michael Paquier , Josh Berkus , Andres Freund , Greg Stark , Jim Nasby , PostgreSQL-development , Robert Haas , Albe Laurenz Subject: Re: Doing better at HINTing an appropriate column within errorMissingColumn() References: <533B31C9.1080403@nasby.net> <20140402201602.GV3750@awork2.anarazel.de> <539F7816.1070809@agliodbs.com> <539F8C26.3040500@2ndquadrant.com> <27925.1402966428@sss.pgh.pa.us> <539FA371.4070902@2ndquadrant.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:4i9tZoqBcx6AUHImvJBUYUW5j1013KbHuWsOeLy/rIP R2q1UXjeyYTNVzTBKbpk5wnp/TNGVNCPq/6MXZqFF9MB8sQr3X lMR+g/NXg+HQBT8JMEMwpwaK79mjBq1NaFkov8EkricigfijyI Oc7on2ZBtL8/EviElxeUIJMJ5sSTCGG0zq0kwnJ1XP6vKowsrq 3W71iMgUvAUP659qSgouxw8ijGifmeiq5sOS9x0k8YcLJSuPCq uv4eJUs2bfJZDpD0NWCSeeNzNTnXWh9VRG0dILQOeVq8XmLTaw 8tl+gby7DrJFukZH24UFo4cUnLM+03dQloug3KdNWwD1V9oAEV 2+SbmxX769ZfEkGd9h2XBb9Xna9wKVIikNzxC2hDA X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 14/06/17 11:57, Peter Geoghegan wrote: > On Mon, Jun 16, 2014 at 7:09 PM, Ian Barwick wrote: >> Howver in this particular use case, as long as it doesn't produce false >> positives (I haven't looked at the patch) I don't think it would cause >> any problems (of the kind which would require actively excluding certain >> languages/character sets), it just wouldn't be quite as useful. > > I'm not sure what you mean by false positives. The patch just shows a > HINT, where before there was none. It's possible for any number of > reasons that it isn't the most useful possible suggestion, since > Levenshtein distance is used as opposed to any other scheme that might > be better sometimes. I think that the hint given is a generally useful > piece of information in the event of an ERRCODE_UNDEFINED_COLUMN > error. Obviously I think the patch is worthwhile, but fundamentally > the HINT given is just a guess, as with the existing HINTs. I mean, does it come up with a suggestion in every case, even if there is no remotely similar column? E.g. would SELECT foo FROM some_table bring up column "bar" as a suggestion if "bar" is the only column in the table? Anyway, is there an up-to-date version of the patch available? The one from March doesn't seem to apply cleanly to HEAD. Thanks Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers