-- pg_turbovec v0.5.0 — Phase 5: pgvector-parity helpers and JSONB casts. -- -- Reference mirror; authoritative SQL is generated by -- `cargo pgrx schema`. SET search_path = turbovec, public; -- =================================================================== -- Slicing -- =================================================================== -- subvector(v vector, start integer, length integer) RETURNS vector -- 1-indexed slice, mirrors pgvector's `subvector`. -- =================================================================== -- JSONB I/O -- =================================================================== -- vec_to_jsonb(vector) RETURNS jsonb -- jsonb_to_vec(jsonb) RETURNS vector -- CREATE CAST (vector AS jsonb) WITH FUNCTION vec_to_jsonb(vector); -- CREATE CAST (jsonb AS vector) WITH FUNCTION jsonb_to_vec(jsonb); -- =================================================================== -- Constructors and assertions -- =================================================================== -- vec_zeros(integer) RETURNS vector -- vec_check_dim(vector, integer) RETURNS vector -- vec_to_text(vector) RETURNS text