
$ 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
==========================================================================




Sun, 19 Nov 2000 14:31:15 -0500 (EST)
Vince Vielhaber <vev@michvhf.com>
psql:  anyone ever notice?
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

Sun, 19 Nov 2000 14:44:01 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: psql: anyone ever notice? 
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/


Sun, 19 Nov 2000 14:14:34 -0600 (CST)
"Dominic J. Eidson" <sauron@the-infinite.org>
Re: psql: anyone ever notice? 
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/


Sun, 19 Nov 2000 21:16:38 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Re: psql:  anyone ever notice?
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.

Sun, 19 Nov 2000 14:21:08 -0600
"Ross J. Reedstrom" <reedstrm@rice.edu>
Re: psql: anyone ever notice?
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
> ==========================================================================
> 
> 
> 
> 

Mon, 20 Nov 2000 10:47:32 +0800
"xuyifeng" <jamexu@telekbird.com.cn>
Re: psql:  anyone ever notice?
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.  ]

Sun, 19 Nov 2000 21:56:06 -0500
Jim Mercer <jim@reptiles.org>
Re: psql:  anyone ever notice?
"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

Sun, 19 Nov 2000 22:00:23 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: psql: anyone ever notice? 
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/


Sat, 25 Nov 2000 20:34:02 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Re: psql:  anyone ever notice?