Skip to content
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

cli: SQL shell history rewriting mangles INTERVAL #14484

Closed
cuongdo opened this issue Mar 30, 2017 · 0 comments · Fixed by #14534
Closed

cli: SQL shell history rewriting mangles INTERVAL #14484

cuongdo opened this issue Mar 30, 2017 · 0 comments · Fixed by #14534
Assignees

Comments

@cuongdo
Copy link
Contributor

cuongdo commented Mar 30, 2017

Repro:

  1. Launch SQL shell
  2. Run SELECT DATE '1998-12-01' - INTERVAL '95' DAY;
  3. Hit up to recall the SELECT and run it again. You'll get the error pq: unsupported binary operator: <date> - <string>.

Expected: #3 should return 0 rows

SQL shell transcript:

root@:26257/tpch> SELECT DATE '1998-12-01' - INTERVAL '95' DAY;
+--------------------------------+
| DATE '1998-12-01' - '0m95d0ns' |
+--------------------------------+
| 1998-08-28 00:00:00+00:00      |
+--------------------------------+
(1 row)
--- I hit "up" then "enter" here
root@:26257/tpch> SELECT DATE '1998-12-01' - '0m95d0ns';
pq: unsupported binary operator: <date> - <string>
@cuongdo cuongdo changed the title cli: SQL shell history rewriting introduces error in SELECT cli: SQL shell history rewriting mangles INTERVAL Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants