Thread: psql: anyone ever notice?

psql: anyone ever notice?

From
Vince Vielhaber
Date:
$ psql -U
psql: option requires an argument -- U
Try -? for help.
$ psql -?
psql: No match.
$

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net128K ISDN from $22.00/mo - 56K Dialup from
$16.00/moat Pop4 Networking       Online Campground Directory    http://www.camping-usa.com      Online Giftshop
Superstore   http://www.cloudninegifts.com
 
==========================================================================





Re: psql: anyone ever notice?

From
Tom Lane
Date:
Vince Vielhaber <vev@michvhf.com> writes:
> $ psql -?
> psql: No match.

Odd --- I get the right thing:

$ psql -?
This is psql, the PostgreSQL interactive terminal.

Usage: psql [options] [dbname [username]]

Options: -a              Echo all input from script -A              Unaligned table output mode (-P format=unaligned)
[etc etc]

Something different about long-option handling on your platform, maybe?
What is your platform, anyway?
        regards, tom lane


Re: psql: anyone ever notice?

From
Peter Eisentraut
Date:
Vince Vielhaber writes:

> $ psql -U
> psql: option requires an argument -- U
> Try -? for help.
> $ psql -?
> psql: No match.

Friggin' csh.  Try 'psql -\?'.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



Re: psql: anyone ever notice?

From
"Dominic J. Eidson"
Date:
On Sun, 19 Nov 2000, Tom Lane wrote:

> Vince Vielhaber <vev@michvhf.com> writes:
> > $ psql -?
> > psql: No match.
> 
> Odd --- I get the right thing:
> 
> $ psql -?
> This is psql, the PostgreSQL interactive terminal.

It has something to do with certain shell's expansion of ? - for the
longest time I'd have to do psql -\? to get it to work.


-- 
Dominic J. Eidson                                       "Baruk Khazad! Khazad ai-menu!" - Gimli
-------------------------------------------------------------------------------
http://www.the-infinite.org/              http://www.the-infinite.org/~dominic/



Re: psql: anyone ever notice?

From
"Ross J. Reedstrom"
Date:
It's a shell thing: Vince is running csh (or a derivative thereof)
while Tom (and I) are running some sort of  Bourne derived shell.

Vince, try:

psql -\?

Which works more universally.

Ross

On Sun, Nov 19, 2000 at 02:44:01PM -0500, Tom Lane wrote:
> Vince Vielhaber <vev@michvhf.com> writes:
> > $ psql -?
> > psql: No match.
> 
> Odd --- I get the right thing:
> 
> $ psql -?
> This is psql, the PostgreSQL interactive terminal.
> 
-- 
Open source code is like a natural resource, it's the result of providing
food and sunshine to programmers, and then staying out of their way.
[...] [It] is not going away because it has utility for both the developers 
and users independent of economic motivations.  Jim Flynn, Sunnyvale, Calif.


Re: psql: anyone ever notice?

From
"xuyifeng"
Date:
all you guy unix?
under some shells, both * and ? are expanded to matched file names in current directory by shell,
for example FreeBSD's csh.

you should use psql -\? to get help screen, this sucks, 
"?" shouldn't be used as a help screen argument.

Regards,
XuYifeng

----- Original Message ----- 
From: Vince Vielhaber <vev@michvhf.com>
To: <pgsql-hackers@postgreSQL.org>
Sent: Monday, November 20, 2000 3:31 AM
Subject: [HACKERS] psql: anyone ever notice?


> 
> $ psql -U
> psql: option requires an argument -- U
> Try -? for help.
> $ psql -?
> psql: No match.
> $
> 
> Vince.
> -- 
> ==========================================================================
> Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
>  128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking
>         Online Campground Directory    http://www.camping-usa.com
>        Online Giftshop Superstore    http://www.cloudninegifts.com
> ==========================================================================
> 
> 
> 
> 


Re: psql: anyone ever notice?

From
Jim Mercer
Date:
On Mon, Nov 20, 2000 at 10:47:32AM +0800, xuyifeng wrote:
> "?" shouldn't be used as a help screen argument.

generally, code doesn't explicitly look for a '?'.

rather, the code notes that the character is not mapped to any argument,
and prints out a usage statement.

-- 
[ Jim Mercer                 jim@reptiles.org              +1 416 410-5633 ]
[          Reptilian Research -- Longer Life through Colder Blood          ]
[  Don't be fooled by cheap Finnish imitations; BSD is the One True Code.  ]


Re: psql: anyone ever notice?

From
Tom Lane
Date:
"xuyifeng" <jamexu@telekbird.com.cn> writes:
> you should use psql -\? to get help screen, this sucks, 
> "?" shouldn't be used as a help screen argument.

I tend to agree, given csh's unhelpful (ahem) behavior.

At the very least, it seems that "psql -h" ought to produce
the full help message, not just a complaint that the syntax
is wrong.
        regards, tom lane


Re: psql: anyone ever notice?

From
Peter Eisentraut
Date:
Vince Vielhaber writes:

> $ psql -U
> psql: option requires an argument -- U
> Try -? for help.
> $ psql -?
> psql: No match.
> $

It advertises '--help' now.  (And yes, '--help' works everywhere.)

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/