Support EXECUTE ... USING for Postgres (#1153)

This commit is contained in:
Jonathan Lehto 2024-03-01 13:49:29 -05:00 committed by GitHub
parent 9db9d22480
commit 68b52a4ad6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 52 additions and 4 deletions

View file

@ -8948,7 +8948,20 @@ impl<'a> Parser<'a> {
self.expect_token(&Token::RParen)?;
}
Ok(Statement::Execute { name, parameters })
let mut using = vec![];
if self.parse_keyword(Keyword::USING) {
using.push(self.parse_expr()?);
while self.consume_token(&Token::Comma) {
using.push(self.parse_expr()?);
}
};
Ok(Statement::Execute {
name,
parameters,
using,
})
}
pub fn parse_prepare(&mut self) -> Result<Statement, ParserError> {