How to create an array from variables in postgresql?
I want to create an array from two variables p, q. Here is my attempt: DO $code$ DECLARE p text := ‘Hello’; q text := ‘world!’; ta text[]; –text array BEGIN ta := {p, q}; RAISE INFO ‘% %’, ta[1], ta[2]; END $code$; but it doesn’t work postgres=# DO postgres-# $code$ postgres$# DECLARE postgres$# p… Read More How to create an array from variables in postgresql?