sql - How can I update a single field in psql with the contents of a file? -
I am trying to do the following:
bodycontent set body = CONTENT_FROM_FILE where Contentid = 12943363; I have tried the following on the basis of the least answer given. The result is the following error. After more searching, I came to know, which does not directly discuss the problem of reading the file, but gives me the necessary components for it. My old Naturally, If it escapes the quote marks inside
error: syntax error "on or near": "line1: update bodycontent body =: 'contentfill' where contentid = 1 ... < P> What is a clean, simple, and effective way to achieve this on the
psql command line?
PostGrace .
\ content This work for the updated bodystructure SET body: `cat foo.txt` \ set quoted_contentFill '\': contentFill '=': quoted_contentFill WHERE contentid = 12 943363;
Foo.txt , it will fail, but I can easily pre-process it to ensure no one is.
Comments
Post a Comment