Quantcast
Channel: Question and Answer » postgresql
Viewing all articles
Browse latest Browse all 1138

Array of template type in PL/pgSQL function using %TYPE

$
0
0

I have a PostgreSQL database and a PL/pgSQL function that currently has arguments with copied types (for example IN arg_1 table_1.column_1%TYPE).

I want to update it so one of those arguments is actually an array of elements with that copied type. If it were a “normal” type, I’d just add [] after the type, like IN arg_1 integer[]. Following that logic, I tried adding the square brackets right after %TYPE, but I get a syntax error.

I couldn’t find anything about in the Postgres docs, nor did my google fu yield useful answers.
How can I achieve that?


Viewing all articles
Browse latest Browse all 1138

Trending Articles