Skip to content

Connection pooling path never registers UDFs or sets trusted_schema #97

Description

@erans

With PGSQLITE_USE_POOLING=true, src/session/pool.rs opens connections without ever calling register_all_functions, and without setting PRAGMA trusted_schema=ON.

Consequences on that path:

  • Catalog UDFs (regexp, pg_table_is_visible, pg_get_userbyid, oid_hash) are unavailable, so any query using them errors.
  • PRAGMA trusted_schema=ON is required for views that call pragma_table_info — which the pg_class view does, for relnatts. Views depending on it fail with unsafe use of virtual table.
  • The pooled read path (src/query/executor.rs -> src/session/query_router.rs -> src/session/read_only_handler.rs) prepares raw SQL with no catalog interception at all, so it also lacks the downstream substring interception the default path relies on.

Pre-existing and untouched by #87. Needs its own test plan, since the pooled router is a separate query path from the default one and nothing in the suite currently exercises it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions