aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-05-31 22:11:44 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-05-31 22:11:44 +0000
commitc6d3c1b817c705f4e06a20fea41add9ec68269c3 (patch)
treef90cd29e73aec38426aad95db6fecb85766b1c70 /src
parent8f165ee13b11baf17b91d858c535419c33a755d6 (diff)
downloadpostgresql-c6d3c1b817c705f4e06a20fea41add9ec68269c3.tar.gz
postgresql-c6d3c1b817c705f4e06a20fea41add9ec68269c3.zip
Fix seriously broken patch for psql '' ... per its comment, emit() is
NOT the thing to use here.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/psqlscan.l10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/psql/psqlscan.l b/src/bin/psql/psqlscan.l
index 2c19b7ae9e1..484558a1415 100644
--- a/src/bin/psql/psqlscan.l
+++ b/src/bin/psql/psqlscan.l
@@ -33,7 +33,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/psql/psqlscan.l,v 1.19 2006/05/31 11:35:17 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/psqlscan.l,v 1.20 2006/05/31 22:11:44 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -857,12 +857,14 @@ other .
}
<xslashquote>{
- /* single-quoted text: copy literally except for backslash sequences */
+ /*
+ * single-quoted text: copy literally except for '' and backslash
+ * sequences
+ */
{quote} { return LEXRES_OK; }
- /* We don't need a state here because we are already in a string */
-{xqdouble} { emit("'", 1); }
+{xqdouble} { appendPQExpBufferChar(output_buf, '\''); }
"\\n" { appendPQExpBufferChar(output_buf, '\n'); }
"\\t" { appendPQExpBufferChar(output_buf, '\t'); }