Re: -c argument not recognized - Mailing list pgsql-general

From Jasen Betts
Subject Re: -c argument not recognized
Date
Msg-id hdr1e0$6um$3@reversiblemaps.ath.cx
Whole thread Raw
In response to -c argument not recognized  (Antonio Ruggiero <aruggiero02@gmail.com>)
List pgsql-general
On 2009-11-10, Antonio Ruggiero <aruggiero02@gmail.com> wrote:
> 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"

On windows you must put the command line arguments in the correct order
(see the documentation for details of correct order)

On linux (and I assume other POSIX) the order is not critical.

windows command-line sucks anyway, so using pipes or temporary files
for the commands is probably a better solution, especially if the
commands are determined at runtime.





pgsql-general by date:

Previous
From: Jasen Betts
Date:
Subject: Re: "money" binary representation
Next
From: Boszormenyi Zoltan
Date:
Subject: What is the correct way to extract values from an int8 array in SPI?