MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / try_pg_catalog

Function try_pg_catalog

nodedb/src/control/server/pgwire/pg_catalog/dispatch.rs:30–36  ·  view source on GitHub ↗

Try to handle a SQL query as a pg_catalog virtual-table lookup. Returns `Some(Ok(response))` if the query targets a known virtual table, `None` if the query should fall through to the normal planner.

(
    state: &SharedState,
    identity: &AuthenticatedIdentity,
    sql: &str,
)

Source from the content-addressed store, hash-verified

28/// Returns `Some(Ok(response))` if the query targets a known virtual table,
29/// `None` if the query should fall through to the normal planner.
30pub async fn try_pg_catalog(
31 state: &SharedState,
32 identity: &AuthenticatedIdentity,
33 sql: &str,
34) -> Option<PgWireResult<Vec<Response>>> {
35 try_pg_catalog_with_params(state, identity, sql, &[]).await
36}
37
38/// Same as [`try_pg_catalog`] but binds prepared-statement parameters into
39/// the SQL before evaluation. The extended-query path uses this so

Callers 1

execute_single_sqlMethod · 0.85

Calls 1

Tested by

no test coverage detected