Commit 1baf58a
committed
Start new line if
Currently the tokenizer throws an error for
insert into cats_2 (petname) values ('foo'),--\r(version()||'\n');
this is because postgres treats \r as a separate new line character, see https://github.com/postgres/postgres/blob/master/src/backend/parser/scan.l
> In order to make the world safe for Windows and Mac clients as well as Unix ones, we accept either \n or \r as a newline.
> A DOS-style \r\n sequence will be seen as two successive newlines, but that doesn't cause any problems.
> non_newline [^\n\r]
> comment ("--"{non_newline}*)
Let's make sure we start a new line if we encounter a \r when tokenizing a comment.\r and dialect is postgres1 parent fe36020 commit 1baf58a
1 file changed
+57
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1621 | 1621 | | |
1622 | 1622 | | |
1623 | 1623 | | |
1624 | | - | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1625 | 1630 | | |
1626 | | - | |
| 1631 | + | |
1627 | 1632 | | |
1628 | 1633 | | |
| 1634 | + | |
1629 | 1635 | | |
1630 | 1636 | | |
1631 | 1637 | | |
| |||
2672 | 2678 | | |
2673 | 2679 | | |
2674 | 2680 | | |
2675 | | - | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
2676 | 2715 | | |
2677 | 2716 | | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
2678 | 2729 | | |
2679 | 2730 | | |
2680 | | - | |
| 2731 | + | |
2681 | 2732 | | |
2682 | 2733 | | |
2683 | | - | |
| 2734 | + | |
2684 | 2735 | | |
2685 | | - | |
| 2736 | + | |
2686 | 2737 | | |
2687 | 2738 | | |
2688 | 2739 | | |
| |||
0 commit comments