| From: | Antonio Ruggiero <aruggiero02(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | -c argument not recognized |
| Date: | 2009-11-10 15:26:56 |
| Message-ID: | d766e9af-2f47-41c3-a013-b1630cd73df5@l2g2000yqd.googlegroups.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I am running PostgresSQL 8.3.8 on windows XP-64Bit. I am using psql
client from the PostgreSQL installation and not the Cygwin client.
My issue is that the command line argument "-c command" is not
recognized. For example, if I run (from Cygwin)
psql -h localhost -p 5432 -d $database postgres -c "select count(*)
from $table_name"
I receive the following output:
psql: warning: extra command-line argument "-c" ignored
psql: warning: extra command-line argument "select count(*) from
$table_name" ignored
Welcome to psql 8.3.8, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
Warning: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
End output.
If I put the query in a file and run the file from the command line,
then it works fine. Furthermore, it appears I have all the necessary
priviledges since I can create/delete/modify tables in the database -
as long as the sql code is in a script file.
I will add that this code runs on an XP-32Bit 8.2 install and I
recently installed PostgreSQL on the XP-64Bit machine.
Thanks for any insight you can provide.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | A B | 2009-11-10 15:56:06 | Re: How can I calculate differences between values |
| Previous Message | David Fetter | 2009-11-10 15:00:06 | Re: Editor for sgml files |