Below is another method
Assumes below is your source table :
CREATE TABLE public.test5 ( id int, zz int, zz1 int);
CREATE PROJECTION public.test5_prj ( id, zz, zz1)AS SELECT test5.id, test5.zz, test5.zz1 FROM public.test5
ORDER BY test5.id SEGMENTED BY hash(test5.id) ALL NODES KSAFE 1;
And you like to copy all the projections from source table to target table + adding column in the middle (new_id type int)
You can you the below technic to modify your source projection to reflect your target structure
[dbadmin@mydphdb0184 ~]$ echo "select export_objects('','public.test5');"|vsql -U dbadmin -w dbadmin| sed -n '/CREATE PROJECTION/,/;/p'|sed "s/id,/id,new_id/g"
The ourout the new projection that reflect your target stracure
CREATE PROJECTION public.test5 /+createtype(A)/
(
id,new_id
zz,
zz1
)
AS
SELECT test5.id,new_id
test5.zz,
test5.zz1
FROM public.test5
ORDER BY test5.id
SEGMENTED BY hash(test5.id) ALL NODES KSAFE 1;