Postgres Use Variable In Soql Substring Method Java