Unverified 提交 13dc84af authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov 提交者: GitHub

Merge pull request #1339 from katzyn/datetime

Add support of TIMESTAMP WITH TIME ZONE to addition and subtraction operators
...@@ -93,3 +93,22 @@ SELECT T0 FROM TEST; ...@@ -93,3 +93,22 @@ SELECT T0 FROM TEST;
DROP TABLE TEST; DROP TABLE TEST;
> ok > ok
SELECT (LOCALTIMESTAMP + 1) = (CURRENT_TIMESTAMP + 1);
>> TRUE
SELECT (TIMESTAMP WITH TIME ZONE '2010-01-01 10:00:00+01' + 1) A,
(1 + TIMESTAMP WITH TIME ZONE '2010-01-01 10:00:00+01') B;
> A B
> ---------------------- ----------------------
> 2010-01-02 10:00:00+01 2010-01-02 10:00:00+01
> rows: 1
SELECT (LOCALTIMESTAMP - 1) = (CURRENT_TIMESTAMP - 1);
>> TRUE
SELECT (TIMESTAMP WITH TIME ZONE '2010-01-01 10:00:00+01' - 1) A;
> A
> ----------------------
> 2009-12-31 10:00:00+01
> rows: 1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论