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>