{"record":{"id":"fca1790d2e74bd53","repo":"OtterMind/Chat2DB","slug":"invalid-postgresql-bit-literal-value","errorCode":null,"errorMessage":"Invalid PostgreSQL bit literal: ${value}","messagePattern":"Invalid PostgreSQL bit literal: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"chat2db-community-server/chat2db-community-plugins/chat2db-community-postgresql/src/main/java/ai/chat2db/plugin/postgresql/PostgreSqlGuards.java","lineNumber":173,"sourceCode":"            throw invalid(\"privilege\", value);\n        }\n        return privilege;\n    }\n\n    public static String requireViewStorageClause(String value) {\n        String storageClause = StringUtils.normalizeSpace(value).toUpperCase(Locale.ROOT);\n        if (!VIEW_STORAGE_CLAUSES.contains(storageClause)) {\n            throw invalid(\"view storage clause\", value);\n        }\n        return storageClause;\n    }\n\n    /**\n     * Validate content of a B'...' bit literal.\n     */\n    public static String requireBitLiteral(String value) {\n        if (value == null || !BIT_LITERAL_PATTERN.matcher(value).matches()) {\n            throw new IllegalArgumentException(\"Invalid PostgreSQL bit literal: \" + value);\n        }\n        return value;\n    }\n\n    /**\n     * Validate content of a \\x... bytea hex literal.\n     */\n    public static String requireHexLiteral(String value) {\n        if (value == null || !HEX_LITERAL_PATTERN.matcher(value).matches()) {\n            throw new IllegalArgumentException(\"Invalid PostgreSQL bytea hex literal: \" + value);\n        }\n        return value;\n    }\n\n    /**\n     * Validate an option that must be one of the given enum constants (e.g. view check option).\n     * Returns the canonical enum name.\n     */","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/chat2db-community-server/chat2db-community-plugins/chat2db-community-postgresql/src/main/java/ai/chat2db/plugin/postgresql/PostgreSqlGuards.java#L155-L191","documentation":"Error \"Invalid PostgreSQL bit literal: ${value}\" thrown in OtterMind/Chat2DB.","triggerScenarios":"A PostgreSQL bit literal contained characters other than 0 and 1.","commonSituations":"See trigger scenarios.","solutions":["Use only 0 and 1 digits in the bit literal, e.g. B'0101'."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}