I Want Auto Generate Alphanumeric(AANNNN) id\'s in postgresql. for eg=AA0001,AA9999,AB0001. And the Order of value increment from right to left.