As per the suggestions received, the syntax for the DATACUBE has
been modified to
SELECT <field list><aggregate list>
INTO <destination table>
FROM <table expression>
WHERE <search condition>
GROUP BY CUBE <aggregate list>
HAVING <search condition>;
Kindly note that the file datacube.c should be placed in src/backend/tcop/
and datacube.h should be in src/include.
Please let us know of further modifications that may be necessary.
Srikanth M
Sumit Kumar Mukherjee