Re: psql tab completion bug and possible fix

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Barwick <barwick(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: psql tab completion bug and possible fix
Date: 2003-10-15 20:45:19
Message-ID: 1596.1066250719@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Ian Barwick <barwick(at)gmx(dot)net> writes:
> On Tuesday 14 October 2003 23:38, Tom Lane wrote:
>> Surely all those replacements of \\ with \\\\ are wrong.

> The slash in the slash command gets escaped too...:

Not the way I did it. You were doing the escaping in the wrong place
IMHO --- the string passed to _complete_from_query() mustn't be escaped
already, because it is not only used to send a command to the backend,
but also to compare against the strings returned by the backend, which
won't be escaped. So the escaping needs to be done internally to
_complete_from_query(), and that eliminates the side-effects elsewhere.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Ian Barwick 2003-10-15 21:04:35 Re: psql tab completion bug and possible fix
Previous Message Ian Barwick 2003-10-15 20:26:38 Re: psql tab completion bug and possible fix