`NULL` in smallint array mapped to `NaN` instead of `null`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 374
- Avg merge
- 11d 16h
- Merged PRs (30d)
- 1
Description
I have a table with a column of type smallint[]. When a value within the array is NULL, Postgres.js maps it to NaN. I would like it to map to a JS null instead.
This would match the behaviour when a whole column's value is NULL, and allow me to coalesce the null value in JS.
Is there a way to configure this? Could the current behaviour be considered a bug?
Thanks,
Adam
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Reproduce the behavior with a PostgreSQL smallint[] containing a NULL through Postgres.js, then locate the array value decoding entry point; done means NULL elements become JavaScript null while whole-column NULL behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100