Difference between date_trunc on Postgres and mapd


I am doing some comparison between Postgres 10.4 and mapd 4.0. One of the queries I am doing uses the date_trunc function. I was just curious as to why Postgres requires the first parameter to have single quotes but mapd does not. In all of my other queries I was able to run identical SQL on Postgres and mapd.

Here is the legal Postgres SQL:

select date_trunc(‘day’, stime) truncated_day

Here is the required/legal mapd SQL:

select date_trunc(day, stime) truncated_day

Is the Postgres method more “standard” SQL than the mapd method (not using single quotes)?


the date_trunc function on mapd is internally converted to a pg_date_trunc function that uses quotes.


select distinct date_trunc(day, L_SHIPDATE) from lineitem;

is executed as

select distinct PG_DATE_TRUNC(‘day’, L_SHIPDATE) from lineitem;