Postgres - update command from CLI

command-line-interface, postgresql, sql-update

Solution

How a_horse_with_no_name said.

psql -U postgres -d dbName -c "UPDATE \"user\" SET \"password\" = 'test'"

Problem

I need to create script in linux. There is command like: ``` psql -U postgres -d ticketon -c "UPDATE "user" SET "password" = 'test'" ``` When I put it to quotation marks, there is mistake. When out of quotation marks, there also is error. I have tried almost everything, but still without success. Do anyone know what is correct syntax?

Original source