You receive the following error in VMware Tanzu Greenplum: ERROR: XX000: This query is not currently supported by GPDB.
One scenario you in which you may encounter this error message is when you:
1. Create a table of gp_toolkit view:
CREATE TABLE shaque.gp_size_of_schema_disk ( snapshot_sk BIGINT, schema_name TEXT, tables_size NUMERIC, indexes_size NUMERIC ) WITH (appendonly=true, compresstype=quicklz) DISTRIBUTED RANDOMLY;
2. Then try to insert something into it:
insert into shaque.gp_size_of_schema_disk SELECT to_char(now(),'YYYYMMDD')::int snapshot_time , sosdnsp schema_name , sosdschematablesize tables_size , sosdschemaidxsize indexes_size FROM gp_toolkit.gp_size_of_schema_disk;
create table my_size_of_schema_disk(like gp_toolkit.gp_size_of_schema_disk); alter table my_size_of_schema_disk add column snapshot_time int; CREATE OR REPLACE FUNCTION get_data() RETURNS TABLE ( schema_name name, tables_size numeric, indexes_size numeric, snapshot_time int ) AS $$ BEGIN RETURN QUERY SELECT sosdnsp schema_name , sosdschematablesize tables_size , sosdschemaidxsize indexes_size , to_char(now(),'YYYYMMDD')::int snapshot_time FROM gp_toolkit.gp_size_of_schema_disk; END; $$ LANGUAGE 'plpgsql' EXECUTE ON INITPLAN; insert into my_size_of_schema_disk select * from get_data();