As shown in the image I'm facing this issue
I'm getting syntax error.
PostgreSQL and Oracle are two different relational database systems.
They have different SQL dialects, and the stored procedure languages PL/SQL and PL/pgSQL are somewhat similar, but different when you get to the details.
You probably want to translate
TYPE mytype IS TABLE OF mytab.mycol%TYPE;
myvar mytype;
to
myvar mycoltype[];
(assuming that mytab.mycol is of type mycoltype.)
The syntax will be different, but you can do similar things.
%TYPE is supported too by PL/pgSQL, but unfortunately, the syntax does not allow arrays to be created from such references.
TABLE OFis supported in Postgres?