electric-sql / electric-sql/pglite

Numeric are cast to text in JS (instead of number)

Open
#742 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16k
Forks
442
Avg merge
20h 19m
Merged PRs (30d)
7

Description

Here's a little reproduction:

```
SELECT 42::text;
SELECT 42::numeric;
SELECT 42::integer;
```

When this run on https://pglite.dev/repl/, I get:

Image

Notice how the numeric is aligned to the left as it's considered text

When this run on https://onecompiler.com/postgresql, I get:

Image

Numeric is correctly aligned to the right.

This is just one way of seeing the bug, my main concern is in JS, after doing a SELECT, I get a string instead of a number.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.