DB: Support extracting and formatting PK from row data