]> granicus.if.org Git - postgresql/commitdiff
Switch in psql_scan() must cover all lexer states (except backslash cases).
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Feb 2014 23:59:38 +0000 (18:59 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 2 Feb 2014 23:59:38 +0000 (18:59 -0500)
Oversight in commit f7559c0101afa33bfb4e104036ca46adac900111, which changed
UESCAPE lexing in psql.  Per bug #9068 from Manuel Gómez.

src/bin/psql/psqlscan.l

index d61387ddf997d039c9ab2999ff5652612a5e9608..dd80611d738a3c944e43b49342f1fc5ea6ed4379 100644 (file)
@@ -1296,6 +1296,8 @@ psql_scan(PsqlScanState state,
                        {
                                /* This switch must cover all non-slash-command states. */
                                case INITIAL:
+                               case xuiend:    /* we treat these like INITIAL */
+                               case xusend:
                                        if (state->paren_depth > 0)
                                        {
                                                result = PSCAN_INCOMPLETE;