mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-11-01 15:44:14 +00:00
Add support for ENABLE and DISABLE on ALTER TABLE for pg (#1077)
Signed-off-by: Toby Hede <toby@cipherstash.com>
This commit is contained in:
parent
593c090b21
commit
a75778c8c7
7 changed files with 143 additions and 7 deletions
|
|
@ -727,10 +727,7 @@ impl<'a> Tokenizer<'a> {
|
|||
// match binary literal that starts with 0x
|
||||
if s == "0" && chars.peek() == Some(&'x') {
|
||||
chars.next();
|
||||
let s2 = peeking_take_while(
|
||||
chars,
|
||||
|ch| matches!(ch, '0'..='9' | 'A'..='F' | 'a'..='f'),
|
||||
);
|
||||
let s2 = peeking_take_while(chars, |ch| ch.is_ascii_hexdigit());
|
||||
return Ok(Some(Token::HexStringLiteral(s2)));
|
||||
}
|
||||
|
||||
|
|
@ -1077,7 +1074,7 @@ impl<'a> Tokenizer<'a> {
|
|||
match chars.peek() {
|
||||
Some('$') => {
|
||||
chars.next();
|
||||
for (_, c) in value.chars().enumerate() {
|
||||
for c in value.chars() {
|
||||
let next_char = chars.next();
|
||||
if Some(c) != next_char {
|
||||
return self.tokenizer_error(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue