Creating a TYPE that is an Array within a Function (or a predefined Array TYPE) in PostgreSQL
2
votes
1
answer
905
views
I am researching migration of a major system from Oracle to PostgreSQL. Getting into coding functions now, and am looking to see if there is a compatible object in PostgreSQL where, dynamically within a Function I can create a TYPE as an array.
The syntax in Oracle is:
TYPE VAR_STRING IS VARRAY(10) VARCHAR2(30);
This creates a 10 element array TYPE named VAR_STRING to hold 10 strings of 30 characters.
I am playing with PG 9.6, and even in the
Create Type
dialog, it is not obvious to me to make a pre-defined TYPE
that can be an array.
Asked by user210170
(21 rep)
Jun 4, 2020, 11:58 PM
Last activity: Jan 26, 2025, 07:00 PM
Last activity: Jan 26, 2025, 07:00 PM