1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! pgRDF — Rust-native PostgreSQL extension for RDF, SPARQL, SHACL and OWL reasoning.
//!
//! Module map (mirrors SPEC.pgRDF.LLD.v0.2 §4):
//! storage — shmem dictionary + partitioned hexastore + COPY BINARY loader
//! query — SPARQL parser + BGP-to-prepared-SQL translator + plan cache
//! inference — reasonable (OWL 2 RL) materialization
//! validation — SHACL validation reports
// `oxrdf::Term` and `spargebra` enums are `#[non_exhaustive]` upstream so
// our catch-all `other => panic!(...)` defensive arms are flagged by
// rustc 1.83+ as unreachable for the variants we already match. Keep
// the arms (they future-proof the translator against upstream variant
// additions) and silence the lint at crate scope.
// The translator's module + function docs use vertically-aligned ASCII
// continuation lines that clippy reads as malformed Markdown list
// items. The rendered rustdoc output looks correct (continuation
// paragraphs); reformatting under the lint would damage readability.
// `SetOfIterator::new(rows.into_iter())` is a deliberate readability
// choice — the explicit `.into_iter()` makes the intent obvious at
// the call-site even though `Vec<T>` already implements
// `IntoIterator`. Allow the lint at crate scope so we don't have to
// litter call sites with annotations.
use *;
pg_module_magic!;
/// Postgres entrypoint. Runs once per process: in the postmaster
/// when `pgrdf` is in `shared_preload_libraries` (the supported
/// production deployment), or lazily in a backend on first extension
/// use. Only the postmaster path can register shmem hooks — see
/// `storage::shmem_cache`.
pub extern "C-unwind"
/// Returns the extension version. Smoke surface used by the install
/// verification: `SELECT pgrdf.version();` should return the version
/// declared in `Cargo.toml`.
extension_sql_file!;