X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab5.sql;h=8dab501385471425296ced8db7f3f3d01673faec;hb=689cef15de94aec192f211f84ca9cd2f1748e551;hp=a4f028d2f14963ede32a16754fd8dc7974466231;hpb=c379c0fff5edc592cc5d5d647c7fadb91317db87;p=plcapi.git diff --git a/planetlab5.sql b/planetlab5.sql index a4f028d..8dab501 100644 --- a/planetlab5.sql +++ b/planetlab5.sql @@ -40,10 +40,9 @@ INSERT INTO plc_db_version (version, subversion) VALUES (5, 100); -- Like MySQL GROUP_CONCAT(), this function aggregates values into a -- PostgreSQL array. -CREATE AGGREGATE array_accum ( +CREATE AGGREGATE array_accum(anycompatible) ( sfunc = array_append, - basetype = anyelement, - stype = anyarray, + stype = anycompatiblearray, initcond = '{}' ); @@ -1170,7 +1169,6 @@ nodes.key, CAST(date_part('epoch', nodes.date_created) AS bigint) AS date_created, CAST(date_part('epoch', nodes.last_updated) AS bigint) AS last_updated, CAST(date_part('epoch', nodes.last_contact) AS bigint) AS last_contact, -CAST(date_part('epoch', nodes.last_boot) AS bigint) AS last_boot, CAST(date_part('epoch', nodes.last_download) AS bigint) AS last_download, CAST(date_part('epoch', nodes.last_pcu_reboot) AS bigint) AS last_pcu_reboot, CAST(date_part('epoch', nodes.last_pcu_confirmation) AS bigint) AS last_pcu_confirmation, @@ -1231,7 +1229,6 @@ AS nodegroup_ids FROM conf_files; -------------------------------------------------------------------------------- -DROP VIEW view_pcus; CREATE OR REPLACE VIEW view_pcus AS SELECT pcus.pcu_id,