How do I create a datatype in plpgsql? I'm new to PostgreSQL, i'm converting oracle procedures into postgresql functions. They have created a type in oracle something like:
TYPE t_array IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;
Then declared & used it in the procedure like:
strings t_array;
strings(1) := lv_str;
I want to create t_array type in plpgsql and use it in functions, how can I create such type or is there any inbuilt type to achieve this functionality in plpgsql?