Re: -c argument not recognized

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: -c argument not recognized
Date: 2009-11-16 08:10:40
Message-ID: hdr1e0$6um$3@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2009-11-10, Antonio Ruggiero <aruggiero02(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Boszormenyi Zoltan 2009-11-16 08:14:57 What is the correct way to extract values from an int8 array in SPI?
Previous Message Jasen Betts 2009-11-16 08:02:25 Re: "money" binary representation