Fixed error when using PG for grocerylist query