Skip to content

Parsing Error for Data Types w/ OID Outside of int4 Range #2974

Open
@e-rich18

Description

@e-rich18

Values that have a data type OID that is outside of the int4 range (i.e. > 2147483647), do not get parsed correctly. This seems especially true for array types, but it could effect any data type with such an OID.

Steps to reproduce:

  1. Create a custom data type in your postgres database (i.e. CREATE TYPE ...) that has an OID outside of the int4 range (I don't know exactly how to accomplish that since it doesn't seem to be deterministic so it may take some trial and error)
  2. Run a select query using Client.query that includes a column having that data type.

Expected Behavior
Column parses according to parsing rules for that data type (e.g. an array is parsed into a JS array)

Actual Behavior
The column is set to a plain string (e.g. '{element,element}' for an array).

Since OIDs are not typically set through manual intervention, this needs to be fixed in the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions