-
Couldn't load subscription status.
- Fork 664
add with/without time zone #589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -505,6 +505,7 @@ define_keywords!( | |
| TIES, | ||
| TIME, | ||
| TIMESTAMP, | ||
| TIMESTAMPTZ, | ||
| TIMEZONE, | ||
| TIMEZONE_HOUR, | ||
| TIMEZONE_MINUTE, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3119,12 +3119,17 @@ impl<'a> Parser<'a> { | |
| Keyword::DATE => Ok(DataType::Date), | ||
| Keyword::DATETIME => Ok(DataType::Datetime), | ||
| Keyword::TIMESTAMP => { | ||
| // TBD: we throw away "with/without timezone" information | ||
| if self.parse_keyword(Keyword::WITH) || self.parse_keyword(Keyword::WITHOUT) { | ||
| if self.parse_keyword(Keyword::WITH) { | ||
| self.expect_keywords(&[Keyword::TIME, Keyword::ZONE])?; | ||
| Ok(DataType::TimestampTz) | ||
| } else if self.parse_keyword(Keyword::WITHOUT) { | ||
| self.expect_keywords(&[Keyword::TIME, Keyword::ZONE])?; | ||
| Ok(DataType::Timestamp) | ||
| } else { | ||
| Ok(DataType::Timestamp) | ||
| } | ||
| Ok(DataType::Timestamp) | ||
| } | ||
|
Comment on lines
-3123
to
3131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. enable |
||
| Keyword::TIMESTAMPTZ => Ok(DataType::TimestampTz), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add TimestampTz into parser |
||
| Keyword::TIME => { | ||
| // TBD: we throw away "with/without timezone" information | ||
| if self.parse_keyword(Keyword::WITH) || self.parse_keyword(Keyword::WITHOUT) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add
DataType::TimestampTz