Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support uuid type #9

Open
hackwaly opened this issue Jan 29, 2021 · 2 comments
Open

Support uuid type #9

hackwaly opened this issue Jan 29, 2021 · 2 comments

Comments

@hackwaly
Copy link

No description provided.

@jeromew
Copy link
Owner

jeromew commented Jan 29, 2021

Hello,
thanks for the report.

in order to support a new postgres type, there must be an agreement on which javascript structure will hold the data.
for floats, I chose the ieee754 module. For other types, native javascript types were ok.

For uuid, it could be a string like "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" or an array of UInt8Array[16] or a buffer.
Each choice has pros/cons.

What is your use case ?

@jeromew
Copy link
Owner

jeromew commented Nov 16, 2021

In the PR #19 it is proposed that the uuid type should be represented in memory as a javascript string.

I would like to have more information on the use case for this because the type impedance (buffer // string) can have a real cost when it is applied on each and every uuid field of all the rows of a table.

I think the uuid are rarely modified so is the string representation really needed or is it just unnecessary work in a buffer=>string=>buffer scenario ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants