-
Notifications
You must be signed in to change notification settings - Fork 73
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
Expand type support #24
Comments
suggestions for further expansion (can create additional github issues):
|
Longer term goal:
|
I'm already (ab)using our type system to convey information between bind and postgres->duckdb value conversion like this: if (typmod == -1 || precision < 0 || scale < 0 || precision > 38) {
auto extra_type_info = duckdb::make_shared<NumericAsDouble>();
return duckdb::LogicalType(duckdb::LogicalTypeId::DOUBLE, std::move(extra_type_info));
} if (aux_info && dynamic_cast<NumericAsDouble *>(aux_info.get())) {
// This NUMERIC could not be converted to a DECIMAL, convert it as DOUBLE instead
auto numeric = DatumGetNumeric(value);
auto numeric_var = FromNumeric(numeric);
auto double_val = ConvertDecimal<double, DecimalConversionDouble>(numeric_var);
Append<double>(result, double_val, offset);
} We can probably use a similar method to preserve the postgres types |
Instead of falling back to |
this has been mostly addressed in #23; lets open a new issue for anything else we are looking to address |
The text was updated successfully, but these errors were encountered: