Re: Why don't dumped files parse in pgAdmin3 query editor? - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Why don't dumped files parse in pgAdmin3 query editor?
Date
Msg-id 45EC3FFF.7070004@iol.ie
Whole thread Raw
In response to Re: Why don't dumped files parse in pgAdmin3 query editor?  (dlivesay@covad.net)
List pgsql-general
On 05/03/2007 15:58, dlivesay@covad.net wrote:

> The main problem I'm having is that any command I try to use with
> psql, even psql /?, causes it to prompt me for a password, and it
> tells me my password is wrong no matter what username/passsword
> combination I try.

Are you using the -U option to connect as a specific user? If you don't,
psql tries to connect as the currently logged-in user.

> Beyond that, I really don't know what the correct syntax to use in
> the Windows command shell is. Would it be "psql -f" or "psql /f"?

Try "psql --help":

C:\Documents and Settings\rod>psql --help
This is psql 8.2.3, the PostgreSQL interactive terminal.

Usage:
   psql [OPTIONS]... [DBNAME [USERNAME]]

General options:
   -d DBNAME       specify database name to connect to (default: "rod")
   -c COMMAND      run only single command (SQL or internal) and exit
   -f FILENAME     execute commands from file, then exit
   -1 ("one")      execute command file as a single transaction
   -l              list available databases, then exit
   -v NAME=VALUE   set psql variable NAME to VALUE
   -X              do not read startup file (~/.psqlrc)
   --help          show this help, then exit
   --version       output version information, then exit

Input and output options:
   -a              echo all input from script
   -e              echo commands sent to server
   -E              display queries that internal commands generate
   -q              run quietly (no messages, only query output)
   -o FILENAME     send query results to file (or |pipe)
   -n              disable enhanced command line editing (readline)
   -s              single-step mode (confirm each query)
   -S              single-line mode (end of line terminates SQL command)
   -L FILENAME     send session log to file

Output format options:
   -A              unaligned table output mode (-P format=unaligned)
   -H              HTML table output mode (-P format=html)
   -t              print rows only (-P tuples_only)
   -T TEXT         set HTML table tag attributes (width, border) (-P
tableattr=)
   -x              turn on expanded table output (-P expanded)
   -P VAR[=ARG]    set printing option VAR to ARG (see \pset command)
   -F STRING       set field separator (default: "|") (-P fieldsep=)
   -R STRING       set record separator (default: newline) (-P recordsep=)

Connection options:
   -h HOSTNAME     database server host or socket directory (default:
"local sock
et")
   -p PORT         database server port (default: "5432")
   -U NAME         database user name (default: "rod")
   -W              prompt for password (should happen automatically)

For more information, type "\?" (for internal commands) or "\help"
(for SQL commands) from within psql, or consult the psql section in
the PostgreSQL documentation.

Report bugs to <pgsql-bugs@postgresql.org>.

HTH,

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

pgsql-general by date:

Previous
From: dlivesay@covad.net
Date:
Subject: Re: Why don't dumped files parse in pgAdmin3 query editor?
Next
From: Magnus Hagander
Date:
Subject: Re: Why don't dumped files parse in pgAdmin3 query editor?