-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
New sql type mapping #615
New sql type mapping #615
Conversation
Signed-off-by: Ana Hobden <[email protected]> Function inference works too Signed-off-by: Ana Hobden <[email protected]> Restructure a bit Signed-off-by: Ana Hobden <[email protected]> Strings and Numeric work, srf somewhat Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
They aren't necessary and are mostly due to a commit that introduced those bounds for certain operations, but that was not necessary then in those circumstances either.
This reverts commit cd50460.
@Hoverbear Alright. I now have this building both ZomboDB and |
Signed-off-by: Ana Hobden <[email protected]>
This PR will now also fix #615. |
Apparently this now works for ZomboDB on build environments that aren't my local? I have no idea what's going wrong on my local. I can fix it later if necessary. |
Okay, so there are a few lingering test errors at zombodb/zombodb#763 but
These errors were likely introduced by #643 which otherwise we expect to have significant performance/correctness improvements from, so we are not reverting that (but we might be adjusting the serialization slightly). Otherwise we're good, it looks like. |
Yay! |
We noticed this seems to have missed some dead code at https://github.com/tcdi/pgx/blob/cafefaaf8810143059f7e731e6cd464a38499c6a/pgx/src/lib.rs#L156 |
Opened #697 |
This revamps the SQL type mapping system to be based around the trait
SqlTranslatable
instead of the currentTypeId
based system.Releasing this has breaking changes and requires a 0.5.0
What's changed
pgx
is now able to map Rust types to SQL based on the existence of anSqlTranslatable
trait (and its results). This trait is implemented for all typespgx
supports, and implementations are generated in#[derive(PostgresType)]
and#[derive(PostgresEnum)]
macros for users.NUMERIC(1, 10)
.Result<T,E>
once codegen is updated.pgx-utils/src/rewriter.rs
itemfn code was mostly migrated into thesql_entity_graph
code and integrated.Breaking changes
i32
andchar
which is passed around during the SQL generation process. Thepgx_graph_magic!()
(and thuspgx_module_magic!()
) macros have had their ABIs changed. Old version ofcargo-pgx
won't work anymore.impl Iterator<Item = ...>
from#[pg_extern]
s. Instead, we haveSetOfIterator<'a, T>
andTableIterator<'a, T>
which generateSETOF T
andTABLE T
in SQL generation respectively.'static
.