Skip to content

Commit a34b912

Browse files
committed
update comment to fix typo and clarify
1 parent 731f400 commit a34b912

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl Parser {
184184

185185
/// Parse an expression prefix
186186
pub fn parse_prefix(&mut self) -> Result<Expr, ParserError> {
187-
// PostgreSQL allows any string literal to be prceded by a type name, indicating that the
187+
// PostgreSQL allows any string literal to be preceded by a type name, indicating that the
188188
// string literal represents a literal of that type. Some examples:
189189
//
190190
// DATE '2020-05-20'
@@ -198,8 +198,8 @@ impl Parser {
198198
// INTERVAL '7' DAY
199199
//
200200
// Note also that naively `SELECT date` looks like a syntax error because the `date` type
201-
// name is not followed by a string literal, but in fact is a valid expression that should
202-
// parse as the column name "date".
201+
// name is not followed by a string literal, but in fact in PostgreSQL it is a valid
202+
// expression that should parse as the column name "date".
203203
maybe!(self.maybe_parse(|parser| {
204204
match parser.parse_data_type()? {
205205
DataType::Interval => parser.parse_literal_interval(),

0 commit comments

Comments
 (0)