srm: Fix compatibility with PostgreSQL 8.4

PostgreSQL 8.4 doesn't support the standards compliant syntax
used in a recent change.

This patch moves the logic into dCache instead.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Albert Rossi <arossi@fnal.gov>
Patch: http://rb.dcache.org/r/6723/