wankdanker / node-odbc

ODBC bindings for node
MIT License
174 stars 79 forks source link

Query results returning cut off values at 63 bytes #90

Closed bencmbrook closed 3 years ago

bencmbrook commented 3 years ago

When querying a table (in this case SELECT schemaname, tablename FROM pg_catalog.pg_tables), the returned values get cut off at 63 characters. When I inspect the column property from the result, I see columnSize: 63, however, this does not appear to be the case with the underlying table. When I look at the table in a SQL client (e.g. Postico), the full values are present in the table, and the columns do not show size constraints.

Rows:

  {
    "schemaname": "example",
    "tablename": "this_is_fine"
  },
  {
    "schemaname": "example",
    "tablename": "this_table_is_an_example_of_something_that_gets_cut_off_too_ear"
  },

Column metadata:

columns: [
  {
    name: 'schemaname',
    dataType: -9,
    columnSize: 63,
    decimalDigits: 0,
    nullable: true
  },
  {
    name: 'tablename',
    dataType: -9,
    columnSize: 63,
    decimalDigits: 0,
    nullable: true
  }
]

Could this be coming from node-odbc, or might this be an issue with the underlying driver? Or with ODBC itself?

In case it's relevant, I'm using the Redshift driver.

markdirish commented 3 years ago

Hey @bencmbrook ,

This looks like a odbc v2.x issue. That repo is over here: https://github.com/markdirish/node-odbc/issues/

Would you mind posting there? Thanks!

bencmbrook commented 3 years ago

Oh, woops! Keep getting these links mixed. Posting there in a moment. Thanks for the redirect