Fixes: https://pagure.io/koji/issue/3483
rebased onto 83f0808ca5d718faa438c8bc733a7fc7e11a6714
PR does also other things. Can we split them to two? (using nextval() and replacing other QPs)
rebased onto c09632d2fdc26a4d275b278e58941e83d3934eaa
rebased onto 3fc402d5f2f76b73b11bc4d3903744736b9cdd8e
@tkopecek fixed
Metadata Update from @tkopecek: - Pull-request tagged with: no_qe
Commit 93ca7ff1 fixes this pull-request
Pull-Request has been merged by tkopecek
Fixes: https://pagure.io/koji/issue/3483