Skip site navigation (1) Skip section navigation (2)

Re: psql: backslash fix

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: psql: backslash fix
Date: 2002-03-12 00:17:51
Message-ID: Pine.LNX.4.30.0203111916070.690-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Neil Conway writes:

> > 3. Ignore the failed backslash command and keep going.  This is what it's
> >    doing.
> Even if we want to continue with this behavior, I think the current
> implementation is confusing: psql should recall the previous buffer, set
> the prompt to "=>", and allow the user to continue editing the command.
> For example:
> nconway=> select foo\\bar;
> Invalid command \. Try \? for help.
> nconway=> select foo
> 	  ^^^^^^^^^^ recalled by psql, the user can continue
> 		     typing after this point

That's an interesting idea.  I'm sure readline can do this, but I haven't

> > Think of psql as an editor and (some of) the backslash commands as editor
> > commands.  When you enter a wrong command in your editor, what does it do?
> It gives me an error. For instance, in vim:
> ":set nooooexpandtab" -> "Unknown option: nooooexpandtab"
> And it returns me to my previous mode. It does _not_ recall ":set ..."

Yes, but note that it doesn't completely clear the editing area or save
the file or compile it.

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to

pgsql-patches by date

Next:From: Peter EisentrautDate: 2002-03-12 00:22:01
Subject: Re: support for POSIX 1003.1-2001 hosts
Previous:From: Peter EisentrautDate: 2002-03-12 00:14:46
Subject: Re: Domain Support -- another round

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group