Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint warnings on bytea/text casts #8

Open
zda opened this issue Oct 9, 2024 · 0 comments
Open

Lint warnings on bytea/text casts #8

zda opened this issue Oct 9, 2024 · 0 comments
Assignees

Comments

@zda
Copy link

zda commented Oct 9, 2024

FYI, I ran https://github.com/okbob/plpgsql_check against my DB after running the sample Postgres implementation, and I think it's complaining that these two text expressions should be cast to bytea:

alphabet bytea = '0123456789abcdefghjkmnpqrstvwxyz';

id bytea = '\x00000000000000000000000000000000';

[
  {
    "function": "public.base32_decode",
    "issues": [
      {
        "level": "warning",
        "message": "target type is different type than source type",
        "statement": {
          "lineNumber": "22",
          "text": "statement block"
        },
        "hint": "The input expression type does not have an assignment cast to the target type.",
        "detail": "cast \"text\" value to \"bytea\" type",
        "context": "during statement block local variable \"id\" initialization on line 22"
      }
    ]
  }
]

When I added ::bytea the warnings went away. Does that seem correct to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants