Skip to content
Snippets Groups Projects
Commit 95dc7785 authored by Tatsuo Ishii's avatar Tatsuo Ishii
Browse files

Add single quote (example given here does not work)

parent 14fa192d
No related branches found
No related tags found
No related merge requests found
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.58 2001/09/03 12:57:50 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.59 2001/09/11 05:11:59 ishii Exp $
Postgres documentation Postgres documentation
--> -->
...@@ -1961,7 +1961,7 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:content);</userinput> ...@@ -1961,7 +1961,7 @@ testdb=> <userinput>INSERT INTO my_table VALUES (:content);</userinput>
they don't cause a syntax error when the third line is processed. This they don't cause a syntax error when the third line is processed. This
could be done with the program <application>sed</application>: could be done with the program <application>sed</application>:
<programlisting> <programlisting>
testdb=> <userinput>\set content `sed -e "s/'/\\\\\\'/g" < my_file.txt`</userinput> testdb=> <userinput>\set content '\'' `sed -e "s/'/\\\\\\'/g" < my_file.txt` '\''</userinput>
</programlisting> </programlisting>
Observe the correct number of backslashes (6)! You can resolve it this way: After Observe the correct number of backslashes (6)! You can resolve it this way: After
<application>psql</application> has parsed this line, it passes <application>psql</application> has parsed this line, it passes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment