PostgreSql segment store: fix segment retrieval

Parsing for segment slices is a brittle hack that should be replaced.