digoal
2016-10-11
greenplum , postgresql , interval , parser
interval是用来表达时间间隔的数据类型,比如1年,或者1分钟,或者1天零多少小时分钟等。
interval可以与时间,日期类型加减。
interval的用法可参考
<a href="https://www.postgresql.org/docs/9.6/static/functions-datetime.html">https://www.postgresql.org/docs/9.6/static/functions-datetime.html</a>
1. postgresql 8.3以及以前的版本不能解释放在单引号外面的单位
2. 8.4以及以后的版本则支持放在外面的单位的写法。
patch在这里
<a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=70530c808bf8eaba2a41a28c9dc7b96dcc3b6c51">https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=70530c808bf8eaba2a41a28c9dc7b96dcc3b6c51</a>
tpch的dbgen产生的query用的是带单位的写法,导致没有出现加减。
涉及的sql如下
例子
这些sql直接影响了tpch的测试结果。
请务必修正query后再执行。
src/backend/utils/adt/timestamp.c
<a href="http://info.flagcounter.com/h9v1">count</a>