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:
Toby Hede 2024-01-01 01:14:52 +11:00 committed by GitHub
parent 593c090b21
commit a75778c8c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 143 additions and 7 deletions

View file

@ -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(