Re: BUG #4337: psql -c case insensitive

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: none <nomind(at)mailinator(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4337: psql -c case insensitive
Date: 2008-08-01 14:27:52
Message-ID: 48931D68.8030406@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> "none" <nomind(at)mailinator(dot)com> writes:
>> I'm programming an application that uses psql (...) -c "ALTER DATABASE
>> \"MyBase\" RENAME TO \"MyBase2\" and it doesn't work because it looks for a
>> "mybase" database name.
>
> Works for me. I speculate that your scripting language is losing the
> embedded double-quotes somewhere before psql gets them. I don't know
> much about Windows scripting so it's hard to say more than that; but
> an extra interpretation pass over the command string would probably
> cause such a problem.

Most likely you're bit by the completely insane rules of quoting in the
windows commandshell. See for example the comments around it in
src/port.h in the PostgreSQL distribution.

//Magnus

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Heeman Lee 2008-08-01 14:38:25 psql's copy binary to stdout
Previous Message Tom Lane 2008-07-31 16:37:36 Re: BUG #4337: psql -c case insensitive