Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-2239

Use `decode` and `encode` instead of `trim` and `format` for handling bytea conversions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDB 3.0.0
    • Fix Version/s: PDB 3.2.3
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      PuppetDB 2015-12-16

      Description

      Currently we use trim and format functions for handling bytea to string conversions in PostgreSQL. This implicitly relies on the PostgreSQL `bytea` output setting being set to its default value `hex` (vs. `escape`). This causes issues in the storage engine where some hashes don't appear to be in the database when they are (when `bytea_output = 'escape'). We should use the `decode(<...>, 'hex')` and `encode(<...>::bytea, 'hex')`

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              andrew.roetker AJ Roetker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support