Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/3/7 Graham Leggett <minfrin@xxxxxxxx>:
> 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. Following the instructions at http://stackoverflow.com/questions/10968039/postgresql-inserting-value-of-a-column-from-a-file I tried this, but get the error below, 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux