I am trying to create a generated column in postgres with the following "as" statement:
array_to_string(
array(
select lpad(regexp_split_to_table(label, E'\\.+'), 5, '0')
),
''
);
However it fails because cannot use subquery in column generation expression. So my question is can that be done without having the nested select to convert the lpad's set of to an array?
Thanks