0

When I run the psql command from the postgres user account like this:

sudo -i -u testuser psql testdb -c 'select * from "USER" where "LogInName"='TESTING';'

so what can i do for this case thank you for your answer.

Til
  • 5,150
  • 13
  • 26
  • 34
Sothy Lorn
  • 2,197
  • 1
  • 6
  • 3
  • I want to do this also so can you help me: `sudo -i -u testuser psql testdb -c 'update "USER" set "Password"='testing' where "LogInName"='TESTING.IT';'` – Sothy Lorn Mar 21 '19 at 03:20

1 Answers1

0

You can use dollar-quoted-string in postgres like mentioned here

sudo -i -u testuser psql testdb -c 'select * from "USER" where "LogInName"=$$TESTING$$;'
  • HI Jonathan thank for your answer, but for this not work for me: `sudo -i -u testuser psql testdb -c 'select * from "USER" where "LogInName"=$$TESTING.IT$$;'` – Sothy Lorn Mar 21 '19 at 03:17