-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Update fcinfo fn toward actual usage #1375
Update fcinfo fn toward actual usage #1375
Conversation
This function seems to have no callers, even in downstreams. Drop it.
A little consistency is a hobgoblin of etc. etc. It's important safety obligations appear where they are important, and not where they do not actually bind.
Now that we support pg12 as a baseline, it's a better public API.
Another case with no public users of it.
/// return unsafe { pg_return_void() }; | ||
/// pg_return_void() | ||
/// } | ||
///``` | ||
/// | ||
/// # Safety | ||
/// | ||
/// This function is unsafe for symmetry with the other related functions that deal with | ||
/// `PG_FUNCTION_INFO_V1` functions. It has no specific safety invariants that must be met. | ||
#[inline] | ||
pub unsafe fn pg_return_void() -> pg_sys::Datum { | ||
pub fn pg_return_void() -> pg_sys::Datum { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should note, despite making this change, it's always better to be able to relax an unsafety than apply one, as it's (mostly) non-breaking to relax it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, I'm totally fine cutting things if it reduces the number of things we need to worry about while figuring out the soundness design changes.
Go for it |
Functions that had no downstream users, some odd misdeclarations, and in one case a function we can expose finally as public because it's actually what we want people to be using, going forward (probably).