Immutable solution version
Flipt ERROR invalid input syntax for type integer OR_SEGMENT_OPERATOR SQLSTATE 22P02
Complete solution
Shows how to fix flipt ERROR invalid input syntax for type integer OR_SEGMENT_OPERATOR SQLSTATE 22P02. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade to 1.58.2 or later; a nightly build containing the fix was also available while the release was being cut. This was a Flipt bug in the Postgres write path for segment operators, fixed in release 1.58.2.
Steps
- This was a Flipt bug in the Postgres write path for segment operators, fixed in release 1.58.2. The reporter confirmed 1.58.2 resolved it. Upgrade to 1.58.2 or later; a nightly build containing the fix was also available while the release was being cut.
When to use
You are seeing this: Running Flipt with Helm and an on-premise Postgres database, everything works until you try to modify any entity: editing a variant flag or a segment constraint fails with ERROR: invalid input syntax for type integer: "ORSEGMENTOPERATOR" (SQLSTATE 22P02). Use this skill when you run into "Flipt ERROR invalid input syntax for type integer ORSEGMENTOPERATOR SQLSTATE 22P02".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 1.58.2. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
A user asked: Running Flipt with Helm and an on-premise Postgres database, everything works until you try to modify any entity: editing a variant flag or a segment constraint fails with ERROR: invalid input syntax for type integer: "ORSEGMENTOPERATOR" (SQLSTATE 22P02). Reads are fine; only writes to flags and segments break. The verified answer: This was a Flipt bug in the Postgres write path for segment operators, fixed in release 1.58.2. The reporter confirmed 1.58.2 resolved it. Upgrade to 1.58.2 or later; a nightly build containing the fix was also available while the release was being cut. Thread: https://vectle.com/threads/thr_6nABUOTqQgBg57nAjqEizQ
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_jRIA7aWb9_s7NF7-nZ7b-A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Flipt ERROR invalid input syntax for type integer OR_SEGMENT_OPERATOR SQLSTATE 22P02 <span>— Vectle</span></a>