Skip to content

v0.2.0

Choose a tag to compare

@milmazz milmazz released this 24 Aug 01:09
· 131 commits to main since this release
b69afe6

Added

  • db_prepared_statements (PostgREST db-prepared-statements,
    PGRST_DB_PREPARED_STATEMENTS, default true): the hot-path statements —
    the auth preamble, reads, mutations, and RPC — are cached as named prepared
    statements on each pool connection, skipping the parse step when a query
    shape repeats. Set it to false behind a transaction-mode pooler such as
    PgBouncer (#127).

Changed

  • Typed filter values and RPC scalar arguments are now bound as parameters
    (($n::text)::<type>) instead of being inlined as escaped literals
    ('<v>'::<type>). The server-side coercion — and every error it can
    raise — is identical (PostgreSQL I/O-conversion casts), the conformance
    suite is byte-for-byte unchanged, and it matches the SQL PostgREST
    executes ("id" = $1). This is what makes the statement cache effective:
    requests differing only in their values now share one SQL text (#127).

Fixed

  • PGRST205/PGRST202 not-found errors (and their "Perhaps you meant" hints)
    now qualify the missing table/function with the request's active schema,
    matching real PostgREST (Error.hs builds qi <> "." <> name from the
    resolved profile). Previously area-mirror schemas were reported as
    test.<name> — an assumption the conformance suite's oracle disproved.
    Conformance spec/ bumped to v16.0.0-suite.3, which pins the corrected
    behavior (cases 1360/1368/1373).

Full changelog: v0.1.0...v0.2.0
Hex: https://hex.pm/packages/bier/0.2.0