summaryrefslogtreecommitdiff
path: root/src/bin/psql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-06-26 19:16:07 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-06-26 19:16:07 +0000
commitd395aecffad7cc6bd043e2d81a1bed5b3fe2f5fa (patch)
tree5ba25b1c13944344adb6972515823d7c47c055cf /src/bin/psql
parent3cbd6bc308cfeb8c2b5e42707f0ffcb7def64c15 (diff)
downloadpostgresql-d395aecffad7cc6bd043e2d81a1bed5b3fe2f5fa.tar.gz
Code review for escape-strings patch. Sync psql and plpgsql lexers
with main, avoid using a SQL-defined SQLSTATE for what is most definitely not a SQL-compatible error condition, fix documentation omissions, adhere to message style guidelines, don't use two GUC_REPORT variables when one is sufficient. Nothing done about pg_dump issues.
Diffstat (limited to 'src/bin/psql')
-rw-r--r--src/bin/psql/psqlscan.l17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bin/psql/psqlscan.l b/src/bin/psql/psqlscan.l
index a093b3703f..f62fe6224f 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.14 2005/06/02 17:45:19 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/psqlscan.l,v 1.15 2005/06/26 19:16:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -235,17 +235,18 @@ quotefail {quote}{whitespace}*"-"
xbstart [bB]{quote}
xbinside [^']*
-/* Hexadecimal number
- */
+/* Hexadecimal number */
xhstart [xX]{quote}
xhinside [^']*
-/* National character
- */
+/* National character */
xnstart [nN]{quote}
+/* Quoted string that allows backslash escapes */
+xestart [eE]{quote}
+
/* Extended quote
- * xqdouble implements embedded quote
+ * xqdouble implements embedded quote, ''''
*/
xqstart {quote}
xqdouble {quote}{quote}
@@ -450,6 +451,10 @@ other .
BEGIN(xq);
ECHO;
}
+{xestart} {
+ BEGIN(xq);
+ ECHO;
+ }
<xq>{quotestop} |
<xq>{quotefail} {
yyless(1);