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

Add cast functions to and from int2 and int4 types #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

zilder
Copy link
Contributor

@zilder zilder commented Dec 6, 2021

This is useful when exporting or importing data from or to external formats (i.e. Apache Parquet).

rapimo
rapimo previously approved these changes May 3, 2023
{
country c = PG_GETARG_INT32(0);

/* XXX we do not check input validity for performance reasons */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a good idea as it risk that invalid values get stored on disk which makes reading back impossible

@rapimo rapimo dismissed their stale review May 3, 2023 07:13

should check validity on int4 to country cast

Copy link
Member

@rapimo rapimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int4_to_country should check that the input is within valid range.

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

Successfully merging this pull request may close these issues.

2 participants