Skip to content

v1.2.0 Big casts refactoring

Latest

Choose a tag to compare

@codercms codercms released this 03 Nov 17:09

What's Changed

  • add __has_builtin marco to fix el8 building problem by @Vonng in #13
  • feat: big casts refactoring by @codercms in #12
    • Replaced "to" cast functions with unified "from" notation
    • Marked cast functions as PARALLEL SAFE to allow parallel queries
    • Cast functions that cannot error marked as LEAKPROOF (may improve performance when using Postgres RLS, see https://dba.stackexchange.com/a/210391/160775)
    • Correctly defined IMPLICIT vs ASSIGNMENT casts:
      • IMPLICIT for error-free casts
      • ASSIGNMENT for casts that may error
    • Native casts for/from float4/float8 types

Breaking Change

Explicit casts are now required for conversions that may cause overflow errors.

You must now use explicit casts in your queries. For example:

  • Cast from a uint type to an int: SELECT some_uint_column::int
  • Cast from an int to a uint type: SELECT some_int_column::uint4

This change aligns the system's behavior with how PostgreSQL handles its own numeric types.

New Contributors

  • @Vonng made their first contribution in #13

Full Changelog: 1.1.1...1.2.0