r9519: add prepared statements for postgresql