Re: psql with option -c fails..

Поиск
Список
Период
Сортировка
От patrick keshishian
Тема Re: psql with option -c fails..
Дата
Msg-id CAN0yQBqTvSFksbKGap5c6xuTrohzZu6FtpuQ1AQitDpRFnBSxQ@mail.gmail.com
обсуждение исходный текст
Ответ на psql with option -c fails..  (akp geek <akpgeek@gmail.com>)
Ответы Re: psql with option -c fails..
Список pgsql-general
On Wed, Sep 21, 2011 at 7:54 AM, akp geek <akpgeek@gmail.com> wrote:
> Hi all -
>                I am trying to run the psql command the following way and
> it's failing . Can you please help?
>                 psql  -d mydb  -c 'update tb_user set accountstatus='A'
> where userid=123'
> ERROR:  column "a" does not exist
> LINE 1: ...date tb_user accountstatus=A

Try:

  psql -d mydb -c "update tb_user set accountstatus='A' where userid=123"

You need to double quotes since you are using single quotes in your SQL string.

--patrick

В списке pgsql-general по дате отправления:

Предыдущее
От: Lonni J Friedman
Дата:
Сообщение: Re: psql with option -c fails..
Следующее
От: akp geek
Дата:
Сообщение: Re: psql with option -c fails..