Re: ERROR: syntax error at or near ":"

Поиск
Список
Период
Сортировка
От Ian Lawrence Barwick
Тема Re: ERROR: syntax error at or near ":"
Дата
Msg-id CAB8KJ=hCtG0EzvFpfdKoBHJrHT4wEqYBGU0QdOn_p9XJKi0VvQ@mail.gmail.com
обсуждение исходный текст
Ответ на ERROR: syntax error at or near ":"  (Graham Leggett <minfrin@sharp.fm>)
Ответы Re: ERROR: syntax error at or near ":"
Список pgsql-general
2013/3/7 Graham Leggett <minfrin@sharp.fm>:
> Hi all,
>
> I have a text file, and I need to update the value of an element in a table with the contents of this text file.
Followingthe instructions at
http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-fileI tried this, but get the
errorbelow, which I do not understand. 
>
> Can anyone explain what might be going wrong, and what I should do instead?
>
> patricia=# \set content `cat /tmp/certificates.txt`
> patricia=# update property set value = :'content' where key = 'patricia.home.security.cacerts';
> ERROR:  syntax error at or near ":"
> LINE 1: update property set value = :'content' where key = 'patricia...

That should work...

Which psql version are you using, and what is the table definition?

Does the same error occur if you attempt to insert data from a
different text file?

Regards

Ian Barwick


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

Предыдущее
От: Greg Williamson
Дата:
Сообщение: Re: ERROR: syntax error at or near ":"
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: ERROR: syntax error at or near ":"