Postgresql Function Set Variable Bash Clothing App