Unix Technical Forum

Suggestion for psql command interpretation

This is a discussion on Suggestion for psql command interpretation within the Pgsql General forums, part of the PostgreSQL category; --> I just made a typo in psql, and it resulted in something I wouldn't have expected. js=# \timimng Showing ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 09:35 PM
Colin Wetherbee
 
Posts: n/a
Default Suggestion for psql command interpretation

I just made a typo in psql, and it resulted in something I wouldn't have
expected.

js=# \timimng
Showing only tuples.

js=# \t
Tuples only is off.

I also wouldn't have expected \timimng to have been interpreted as
\timing, which I tried to type in the first place, but perhaps a typo
like this should throw an error?

Colin

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 09:35 PM
Colin Wetherbee
 
Posts: n/a
Default Re: Suggestion for psql command interpretation

Colin Wetherbee wrote:
> I just made a typo in psql, and it resulted in something I wouldn't have
> expected.


Oh, um, this was in the 8.3.1 psql.

Colin


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 09:35 PM
Tom Lane
 
Posts: n/a
Default Re: Suggestion for psql command interpretation

Colin Wetherbee <cww@denterprises.org> writes:
> I just made a typo in psql, and it resulted in something I wouldn't have
> expected.


> js=# \timimng
> Showing only tuples.


This is related to the discussion about whether to require a space
between a backslash command name and its arguments ...

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 05:09 PM
Colin Wetherbee
 
Posts: n/a
Default Re: Suggestion for psql command interpretation

Tom Lane wrote:
> Colin Wetherbee <cww@denterprises.org> writes:
>> I just made a typo in psql, and it resulted in something I
>> wouldn't have expected.

>
>> js=# \timimng Showing only tuples.

>
> This is related to the discussion about whether to require a space
> between a backslash command name and its arguments ...


I see.

So, this was interpreted by psql in the same way "\t imimng" would
have been? Not that \t does anything with arguments, though...

I just thought I'd report it here in case it wasn't supposed to
happen, but from what you say, it seems like it's a "feature".

Colin


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-17-2008, 05:09 PM
Tom Lane
 
Posts: n/a
Default Re: Suggestion for psql command interpretation

Colin Wetherbee <cww@denterprises.org> writes:
> I just thought I'd report it here in case it wasn't supposed to
> happen, but from what you say, it seems like it's a "feature".


Well, it's more of a historical hangover. Personally I'd not have
much problem with breaking backward compatibility on this point.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-17-2008, 05:09 PM
Colin Wetherbee
 
Posts: n/a
Default Re: Suggestion for psql command interpretation

Tom Lane wrote:
> Colin Wetherbee <cww@denterprises.org> writes:
>> I just thought I'd report it here in case it wasn't supposed to
>> happen, but from what you say, it seems like it's a "feature".

>
> Well, it's more of a historical hangover. Personally I'd not have
> much problem with breaking backward compatibility on this point.


I'm not generally in the habit of making typos, so this doesn't affect
me too much.

However, IMHO and as I mentioned previously, I don't think "\timimng"
should succeed. I'll leave the rest of the discussion up to you and
the other developers, though.

Colin

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-17-2008, 05:09 PM
Lincoln Yeoh
 
Posts: n/a
Default Re: Suggestion for psql command interpretation

At 04:46 AM 4/16/2008, Colin Wetherbee wrote:
>Tom Lane wrote:
>>Colin Wetherbee <cww@denterprises.org> writes:
>>>I just thought I'd report it here in case it wasn't supposed to
>>>happen, but from what you say, it seems like it's a "feature".

>>Well, it's more of a historical hangover. Personally I'd not have
>>much problem with breaking backward compatibility on this point.

>
>I'm not generally in the habit of making typos, so this doesn't
>affect me too much.
>
>However, IMHO and as I mentioned previously, I don't think
>"\timimng" should succeed. I'll leave the rest of the discussion up
>to you and the other developers, though.


I too agree that \timimng should not work.

Maybe someone can think of an undesirable surprise that springs from
this "feature" .

\i
\e

Are possible candidates (probably others could clobber files given a typo).

I think requiring a space between command and arguments would be a
good idea. And not doing stuff if there are syntax errors...

Link.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:21 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com