Thank you for the update.
So seems like bind variable can't be used in "DO" block.
We are running on RDS PostgreSQL 9.6.
I will update with the code soon.
--
View this message in context: http://www.postgresql-archive.org/Using-bind-variable-within-BEGIN-END-tp5964384p5964400.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.