sphinxlink
sphinxlink · C extension for issuing SphinxSearch or ManticoreSearch queries from PostgreSQL through the MySQL-compatible protocol.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100405 | sphinxlink | sphinxlink | 1.4 | FTS | Unknown | C |
| Relationships | |
|---|---|
| Requires | plpgsql |
Usage
Sources:
sphinxlink sends SphinxSearch or ManticoreSearch SQL over their MySQL-compatible protocol and exposes the result as a PostgreSQL record set. It can retain named connections in a backend or open a connection for one query, and it exposes metadata from the last remote search.
Connect and Query
The caller must provide a column definition list matching the remote result because sphinx_query() returns records of caller-defined shape.
sphinx_connections() lists open named connections. The sphinx_query_params(host, port, query) variants connect automatically. Overloads with match_clause substitute the MATCH(?) value; other query structure remains part of the remote SQL string.
Remote-System Boundary
Queries execute synchronously from a PostgreSQL backend and are outside PostgreSQL transaction rollback. Network stalls, remote limits, result-shape changes, protocol errors, and Manticore/Sphinx version differences can fail or occupy the database session. Set external network timeouts and statement timeouts, constrain reachable hosts, and match every returned column type on representative data.
Treat the query string as remote SQL and never concatenate untrusted identifiers, predicates, or commands. The match-clause overload only protects its intended MATCH(?) value and is not a general SQL parameterization API. Review default function grants, allow only trusted callers, monitor connection cleanup under pooling and cancellation, and do not assume that last-query metadata survives a different backend connection.