Database Functions & Utilities
Authoritative catalog of PostgreSQL functions, security definer contexts, and internal calculation procedures.
Database Functions & Utilities
Attendrix encapsulates core domain logic inside PostgreSQL functions to eliminate client-side race conditions, guarantee ACID transaction semantics, and optimize latency by running calculations directly inside the database engine.
Functions directly callable by the Flutter mobile client over PostgREST RPC are detailed in RPC Reference. This page catalogs internal database utilities, calculation engines, and administrative procedures.
Security Models: DEFINER vs INVOKER
- SECURITY DEFINER: Functions execute with the privileges of the database user who created them (
postgres). Used for operations that must safely bypass RLS to read or update protected shared tables (e.g. recalculating course attendance averages, claiming background jobs, or modifying Google Calendar leases). - SECURITY INVOKER: Functions execute with the permissions of the calling user (
auth.uid()). RLS policies are actively enforced on all internal queries.
Function Catalog
| Function Name | Return Type | Security | Volatility | Arguments |
|---|---|---|---|---|
_pgr_alphashape | SETOF record | INVOKER | VOLATILE | text, alpha double precision DEFAULT 0, OUT seq1 bigint, OUT textgeom text |
_pgr_array_reverse | anyarray | INVOKER | IMMUTABLE | anyarray |
_pgr_articulationpoints | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT seq integer, OUT node bigint |
_pgr_astar | SETOF record | INVOKER | VOLATILE | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean DEFAULT true, heuristic integer DEFAULT 5, factor double precision DEFAULT 1.0, epsilon double precision DEFAULT 1.0, only_cost boolean DEFAULT false, normal boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_astar | SETOF record | INVOKER | VOLATILE | edges_sql text, combinations_sql text, directed boolean DEFAULT true, heuristic integer DEFAULT 5, factor double precision DEFAULT 1.0, epsilon double precision DEFAULT 1.0, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bdastar | SETOF record | INVOKER | VOLATILE | text, anyarray, anyarray, directed boolean DEFAULT true, heuristic integer DEFAULT 5, factor double precision DEFAULT 1.0, epsilon double precision DEFAULT 1.0, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bdastar | SETOF record | INVOKER | VOLATILE | text, text, directed boolean DEFAULT true, heuristic integer DEFAULT 5, factor double precision DEFAULT 1.0, epsilon double precision DEFAULT 1.0, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bddijkstra | SETOF record | INVOKER | VOLATILE | text, text, directed boolean, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bddijkstra | SETOF record | INVOKER | VOLATILE | text, anyarray, anyarray, directed boolean, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bellmanford | SETOF record | INVOKER | IMMUTABLE | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bellmanford | SETOF record | INVOKER | IMMUTABLE | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_biconnectedcomponents | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint |
_pgr_binarybreadthfirstsearch | SETOF record | INVOKER | IMMUTABLE | edges_sql text, combinations_sql text, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_binarybreadthfirstsearch | SETOF record | INVOKER | IMMUTABLE | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bipartite | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT node bigint, OUT color bigint |
_pgr_boost_version | text | INVOKER | VOLATILE | — |
_pgr_breadthfirstsearch | SETOF record | INVOKER | IMMUTABLE | edges_sql text, from_vids anyarray, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_bridges | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT seq integer, OUT edge bigint |
_pgr_build_type | text | INVOKER | VOLATILE | — |
_pgr_checkcolumn | boolean | INVOKER | VOLATILE | text, text, text, is_optional boolean DEFAULT false, dryrun boolean DEFAULT false |
_pgr_checkquery | text | INVOKER | VOLATILE | text |
_pgr_checkverttab | record | INVOKER | VOLATILE | vertname text, columnsarr text[], reporterrs integer DEFAULT 1, fnname text DEFAULT '_pgr_checkVertTab'::text, OUT sname text, OUT vname text |
_pgr_chinesepostman | SETOF record | INVOKER | VOLATILE | edges_sql text, only_cost boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_compilation_date | text | INVOKER | VOLATILE | — |
_pgr_compiler_version | text | INVOKER | VOLATILE | — |
_pgr_connectedcomponents | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint |
_pgr_contraction | SETOF record | INVOKER | VOLATILE | edges_sql text, contraction_order bigint[], max_cycles integer DEFAULT 1, forbidden_vertices bigint[] DEFAULT ARRAY[]::bigint[], directed boolean DEFAULT true, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision |
_pgr_createindex | void | INVOKER | VOLATILE | tabname text, colname text, indext text, reporterrs integer DEFAULT 1, fnname text DEFAULT '_pgr_createIndex'::text |
_pgr_createindex | void | INVOKER | VOLATILE | sname text, tname text, colname text, indext text, reporterrs integer DEFAULT 1, fnname text DEFAULT '_pgr_createIndex'::text |
_pgr_cuthillmckeeordering | SETOF record | INVOKER | IMMUTABLE | text, OUT seq bigint, OUT node bigint |
_pgr_dagshortestpath | SETOF record | INVOKER | IMMUTABLE | text, text, directed boolean DEFAULT true, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dagshortestpath | SETOF record | INVOKER | IMMUTABLE | text, anyarray, anyarray, directed boolean DEFAULT true, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_depthfirstsearch | SETOF record | INVOKER | VOLATILE | edges_sql text, root_vids anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstra | SETOF record | INVOKER | VOLATILE | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstra | SETOF record | INVOKER | VOLATILE | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean DEFAULT true, only_cost boolean DEFAULT false, normal boolean DEFAULT true, n_goals bigint DEFAULT 0, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstra | SETOF record | INVOKER | VOLATILE | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, only_cost boolean, normal boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstra | SETOF record | INVOKER | VOLATILE | edges_sql text, combinations_sql text, directed boolean DEFAULT true, only_cost boolean DEFAULT false, normal boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstranear | SETOF record | INVOKER | VOLATILE | text, bigint, anyarray, bigint, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstranear | SETOF record | INVOKER | VOLATILE | text, anyarray, anyarray, bigint, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstranear | SETOF record | INVOKER | VOLATILE | text, anyarray, bigint, bigint, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_dijkstravia | SETOF record | INVOKER | VOLATILE | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision |
_pgr_drivingdistance | SETOF record | INVOKER | VOLATILE | edges_sql text, start_vids anyarray, distance double precision, directed boolean DEFAULT true, equicost boolean DEFAULT false, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_edgecoloring | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT edge_id bigint, OUT color_id bigint |
_pgr_edgedisjointpaths | SETOF record | INVOKER | VOLATILE | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_edgedisjointpaths | SETOF record | INVOKER | VOLATILE | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_edwardmoore | SETOF record | INVOKER | IMMUTABLE | edges_sql text, combinations_sql text, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_edwardmoore | SETOF record | INVOKER | IMMUTABLE | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_endpoint | geometry | INVOKER | IMMUTABLE | g geometry |
_pgr_floydwarshall | SETOF record | INVOKER | VOLATILE | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision |
_pgr_get_statement | text | INVOKER | STABLE | o_sql text |
_pgr_getcolumnname | text | INVOKER | VOLATILE | tab text, col text, reporterrs integer DEFAULT 1, fnname text DEFAULT '_pgr_getColumnName'::text |
_pgr_getcolumnname | text | INVOKER | VOLATILE | sname text, tname text, col text, reporterrs integer DEFAULT 1, fnname text DEFAULT '_pgr_getColumnName'::text |
_pgr_getcolumntype | text | INVOKER | VOLATILE | tab text, col text, reporterrs integer DEFAULT 0, fnname text DEFAULT '_pgr_getColumnType'::text |
_pgr_getcolumntype | text | INVOKER | VOLATILE | sname text, tname text, cname text, reporterrs integer DEFAULT 0, fnname text DEFAULT '_pgr_getColumnType'::text |
_pgr_gettablename | record | INVOKER | VOLATILE | tab text, reporterrs integer DEFAULT 0, fnname text DEFAULT '_pgr_getTableName'::text, OUT sname text, OUT tname text |
_pgr_git_hash | text | INVOKER | VOLATILE | — |
_pgr_hawickcircuits | SETOF record | INVOKER | IMMUTABLE | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_iscolumnindexed | boolean | INVOKER | VOLATILE | sname text, tname text, cname text, reporterrs integer DEFAULT 1, fnname text DEFAULT '_pgr_isColumnIndexed'::text |
_pgr_iscolumnindexed | boolean | INVOKER | VOLATILE | tab text, col text, reporterrs integer DEFAULT 1, fnname text DEFAULT '_pgr_isColumnIndexed'::text |
_pgr_iscolumnintable | boolean | INVOKER | VOLATILE | tab text, col text |
_pgr_isplanar | boolean | INVOKER | IMMUTABLE | text |
_pgr_johnson | SETOF record | INVOKER | VOLATILE | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision |
_pgr_kruskal | SETOF record | INVOKER | VOLATILE | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_ksp | SETOF record | INVOKER | VOLATILE | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_lengauertarjandominatortree | SETOF record | INVOKER | VOLATILE | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint |
_pgr_lib_version | text | INVOKER | VOLATILE | — |
_pgr_linegraph | SETOF record | INVOKER | IMMUTABLE | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision |
_pgr_linegraphfull | SETOF record | INVOKER | IMMUTABLE | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint |
_pgr_makeconnected | SETOF record | INVOKER | IMMUTABLE | text, OUT seq bigint, OUT start_vid bigint, OUT end_vid bigint |
_pgr_maxcardinalitymatch | SETOF record | INVOKER | VOLATILE | edges_sql text, directed boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint |
_pgr_maxflow | SETOF record | INVOKER | VOLATILE | edges_sql text, combinations_sql text, algorithm integer DEFAULT 1, only_flow boolean DEFAULT false, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint |
_pgr_maxflow | SETOF record | INVOKER | VOLATILE | edges_sql text, sources anyarray, targets anyarray, algorithm integer DEFAULT 1, only_flow boolean DEFAULT false, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint |
_pgr_maxflowmincost | SETOF record | INVOKER | IMMUTABLE | edges_sql text, sources anyarray, targets anyarray, only_cost boolean DEFAULT false, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_maxflowmincost | SETOF record | INVOKER | IMMUTABLE | edges_sql text, combinations_sql text, only_cost boolean DEFAULT false, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_msg | void | INVOKER | VOLATILE | msgkind integer, fnname text, msg text DEFAULT '---->OK'::text |
_pgr_onerror | void | INVOKER | VOLATILE | errcond boolean, reporterrs integer, fnname text, msgerr text, hinto text DEFAULT 'No hint'::text, msgok text DEFAULT 'OK'::text |
_pgr_operating_system | text | INVOKER | VOLATILE | — |
_pgr_parameter_check | boolean | INVOKER | VOLATILE | fn text, sql text, big boolean DEFAULT false |
_pgr_pgsql_version | text | INVOKER | VOLATILE | — |
_pgr_pickdeliver | SETOF record | INVOKER | VOLATILE | text, text, text, factor double precision DEFAULT 1, max_cycles integer DEFAULT 10, initial_sol integer DEFAULT 4, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision |
_pgr_pickdelivereuclidean | SETOF record | INVOKER | VOLATILE | text, text, factor double precision DEFAULT 1, max_cycles integer DEFAULT 10, initial_sol integer DEFAULT 4, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision |
_pgr_pointtoid | bigint | INVOKER | VOLATILE | point geometry, tolerance double precision, vertname text, srid integer |
_pgr_prim | SETOF record | INVOKER | VOLATILE | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_quote_ident | text | INVOKER | IMMUTABLE | idname text |
_pgr_sequentialvertexcoloring | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT vertex_id bigint, OUT color_id bigint |
_pgr_startpoint | geometry | INVOKER | IMMUTABLE | g geometry |
_pgr_stoerwagner | SETOF record | INVOKER | VOLATILE | edges_sql text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision |
_pgr_strongcomponents | SETOF record | INVOKER | IMMUTABLE | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint |
_pgr_topologicalsort | SETOF record | INVOKER | VOLATILE | edges_sql text, OUT seq integer, OUT sorted_v bigint |
_pgr_transitiveclosure | SETOF record | INVOKER | VOLATILE | edges_sql text, OUT seq integer, OUT vid bigint, OUT target_array bigint[] |
_pgr_trsp | SETOF record | INVOKER | VOLATILE | text, text, bigint, bigint, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_trsp | SETOF record | INVOKER | VOLATILE | text, text, anyarray, bigint, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_trsp | SETOF record | INVOKER | VOLATILE | text, text, bigint, anyarray, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_trsp | SETOF record | INVOKER | IMMUTABLE | sql text, source_eid integer, source_pos double precision, target_eid integer, target_pos double precision, directed boolean, has_reverse_cost boolean, turn_restrict_sql text DEFAULT NULL::text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision |
_pgr_trsp | SETOF record | INVOKER | VOLATILE | text, text, anyarray, anyarray, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_trsp_withpoints | SETOF record | INVOKER | VOLATILE | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_trsp_withpoints | SETOF record | INVOKER | VOLATILE | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_trspvia | SETOF record | INVOKER | VOLATILE | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision |
_pgr_trspvia_withpoints | SETOF record | INVOKER | VOLATILE | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision |
_pgr_trspviavertices | SETOF record | INVOKER | STABLE | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision |
_pgr_tsp | SETOF record | INVOKER | VOLATILE | matrix_row_sql text, start_id bigint DEFAULT 0, end_id bigint DEFAULT 0, max_processing_time double precision DEFAULT 'Infinity'::double precision, tries_per_temperature integer DEFAULT 500, max_changes_per_temperature integer DEFAULT 60, max_consecutive_non_changes integer DEFAULT 100, initial_temperature double precision DEFAULT 100, final_temperature double precision DEFAULT 0.1, cooling_factor double precision DEFAULT 0.9, randomize boolean DEFAULT true, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_tspeuclidean | SETOF record | INVOKER | VOLATILE | coordinates_sql text, start_id bigint DEFAULT 0, end_id bigint DEFAULT 0, max_processing_time double precision DEFAULT 'Infinity'::double precision, tries_per_temperature integer DEFAULT 500, max_changes_per_temperature integer DEFAULT 60, max_consecutive_non_changes integer DEFAULT 100, initial_temperature double precision DEFAULT 100, final_temperature double precision DEFAULT 0.1, cooling_factor double precision DEFAULT 0.9, randomize boolean DEFAULT true, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_turnrestrictedpath | SETOF record | INVOKER | IMMUTABLE | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, stop_on_first boolean, strict boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_versionless | boolean | INVOKER | VOLATILE | v1 text, v2 text |
_pgr_vrponedepot | SETOF record | INVOKER | VOLATILE | text, text, text, integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision |
_pgr_withpoints | SETOF record | INVOKER | VOLATILE | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean DEFAULT false, normal boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_withpoints | SETOF record | INVOKER | VOLATILE | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean DEFAULT false, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_withpointsdd | SETOF record | INVOKER | VOLATILE | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean DEFAULT true, driving_side character DEFAULT 'b'::bpchar, details boolean DEFAULT false, equicost boolean DEFAULT false, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_withpointsksp | SETOF record | INVOKER | STABLE | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_pgr_withpointsvia | SETOF record | INVOKER | VOLATILE | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision |
_pgr_withpointsvia | SETOF record | INVOKER | VOLATILE | sql text, via_edges bigint[], fraction double precision[], directed boolean DEFAULT true, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision |
_postgis_deprecate | void | INVOKER | IMMUTABLE | oldname text, newname text, version text |
_postgis_index_extent | box2d | INVOKER | STABLE | tbl regclass, col text |
_postgis_join_selectivity | double precision | INVOKER | VOLATILE | regclass, text, regclass, text, text DEFAULT '2'::text |
_postgis_pgsql_version | text | INVOKER | STABLE | — |
_postgis_scripts_pgsql_version | text | INVOKER | IMMUTABLE | — |
_postgis_selectivity | double precision | INVOKER | VOLATILE | tbl regclass, att_name text, geom geometry, mode text DEFAULT '2'::text |
_postgis_stats | text | INVOKER | VOLATILE | tbl regclass, att_name text, text DEFAULT '2'::text |
_trsp | SETOF record | INVOKER | VOLATILE | text, text, anyarray, anyarray, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_v4trsp | SETOF record | INVOKER | VOLATILE | text, text, anyarray, anyarray, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
_v4trsp | SETOF record | INVOKER | VOLATILE | text, text, text, directed boolean DEFAULT true, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision |
acquire_gcal_user_sync_lease | boolean | DEFINER | VOLATILE | p_user_id uuid, p_worker_id text, p_lease_seconds integer DEFAULT 30 |
add_new_course | jsonb | DEFINER | VOLATILE | p_course_code text, p_course_name text, p_course_type text DEFAULT 'DC'::text, p_credits smallint DEFAULT 3, p_slot text DEFAULT 'A1'::text, p_venue text DEFAULT NULL::text, p_auto_enroll boolean DEFAULT true |
add_new_course | jsonb | DEFINER | VOLATILE | p_course_code text, p_course_name text, p_course_type text DEFAULT 'DC'::text, p_credits integer DEFAULT 3, p_slot text DEFAULT 'A1'::text, p_venue text DEFAULT NULL::text, p_auto_enroll boolean DEFAULT true |
addauth | boolean | INVOKER | VOLATILE | text |
addgeometrycolumn | text | INVOKER | VOLATILE | table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean DEFAULT true |
addgeometrycolumn | text | INVOKER | VOLATILE | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer, new_type character varying, new_dim integer, use_typmod boolean DEFAULT true |
addgeometrycolumn | text | INVOKER | STABLE | schema_name character varying, table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean DEFAULT true |
box | box | INVOKER | IMMUTABLE | geometry |
box | box | INVOKER | IMMUTABLE | box3d |
box2d | box2d | INVOKER | IMMUTABLE | geometry |
box2d | box2d | INVOKER | IMMUTABLE | box3d |
box2df_in | box2df | INVOKER | IMMUTABLE | cstring |
box2df_out | cstring | INVOKER | IMMUTABLE | box2df |
box3d | box3d | INVOKER | IMMUTABLE | geometry |
box3d | box3d | INVOKER | IMMUTABLE | box2d |
box3dtobox | box | INVOKER | IMMUTABLE | box3d |
bytea | bytea | INVOKER | IMMUTABLE | geography |
bytea | bytea | INVOKER | IMMUTABLE | geometry |
cancel_class | boolean | DEFINER | VOLATILE | p_class_id uuid, p_reason text DEFAULT NULL::text |
change_course_offering | jsonb | DEFINER | VOLATILE | p_course_code text, p_new_course_id text |
checkauth | integer | INVOKER | VOLATILE | text, text, text |
checkauth | integer | INVOKER | VOLATILE | text, text |
claim_gcal_sync_jobs | TABLE(job_id bigint, job_type text, payload jsonb, status text, attempts integer, max_attempts integer, created_at timestamp with time zone, next_run_at timestamp with time zone) | DEFINER | VOLATILE | p_worker_id text, p_batch_size integer DEFAULT 25, p_lease_minutes integer DEFAULT 5 |
claim_notification_jobs | TABLE(job_id bigint, notification_type text, recipient_user_id uuid, recipient_batch_id text, course_id text, payload jsonb, dedup_key text, status text, attempts integer, max_attempts integer, scheduled_at timestamp with time zone) | DEFINER | VOLATILE | p_worker_id text, p_batch_size integer DEFAULT 100, p_lease_minutes integer DEFAULT 5 |
complete_user_onboarding | boolean | DEFINER | VOLATILE | p_full_name text, p_roll_number text, p_department_id text, p_batch_id text, p_current_semester smallint, p_username text DEFAULT NULL::text, p_bio text DEFAULT NULL::text |
compute_challenge_expires_at | timestamp with time zone | INVOKER | STABLE | p_challenge_type challenge_type, p_reference_ts timestamp with time zone DEFAULT now() |
compute_challenge_period_key | text | INVOKER | STABLE | p_challenge_type challenge_type, p_reference_ts timestamp with time zone DEFAULT now() |
configure_batch_schedule | jsonb | DEFINER | VOLATILE | p_batch_id text, p_schedule_items jsonb, p_semester_id uuid DEFAULT NULL::uuid |
configure_course_schedule | jsonb | DEFINER | VOLATILE | p_course_code text, p_slot text, p_batch_id text DEFAULT NULL::text, p_venue text DEFAULT NULL::text, p_semester_id uuid DEFAULT NULL::uuid |
consume_oauth_state | TABLE(user_id uuid, pkce_verifier text, redirect_uri text) | DEFINER | VOLATILE | p_state text |
contains_2d | boolean | INVOKER | IMMUTABLE | geometry, box2df |
contains_2d | boolean | INVOKER | IMMUTABLE | box2df, geometry |
contains_2d | boolean | INVOKER | IMMUTABLE | box2df, box2df |
create_task | TABLE(task_id uuid, created_at timestamp with time zone) | DEFINER | VOLATILE | p_semester_id uuid, p_task_type text, p_title text, p_course_code text DEFAULT NULL::text, p_batch_id text DEFAULT NULL::text, p_description text DEFAULT NULL::text, p_due_date timestamp with time zone DEFAULT NULL::timestamp with time zone, p_exam_start timestamp with time zone DEFAULT NULL::timestamp with time zone, p_exam_end timestamp with time zone DEFAULT NULL::timestamp with time zone, p_venue text DEFAULT NULL::text, p_max_score numeric DEFAULT NULL::numeric, p_attachments jsonb DEFAULT '[]'::jsonb, p_is_visible boolean DEFAULT true |
deactivate_device | boolean | DEFINER | VOLATILE | p_subscription_id text |
delete_task | boolean | DEFINER | VOLATILE | p_task_id uuid |
disablelongtransactions | text | INVOKER | VOLATILE | — |
dropgeometrycolumn | text | INVOKER | VOLATILE | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying |
dropgeometrycolumn | text | INVOKER | VOLATILE | table_name character varying, column_name character varying |
dropgeometrycolumn | text | INVOKER | VOLATILE | schema_name character varying, table_name character varying, column_name character varying |
dropgeometrytable | text | INVOKER | VOLATILE | schema_name character varying, table_name character varying |
dropgeometrytable | text | INVOKER | VOLATILE | catalog_name character varying, schema_name character varying, table_name character varying |
dropgeometrytable | text | INVOKER | VOLATILE | table_name character varying |
edit_class | jsonb | DEFINER | VOLATILE | p_class_id uuid, p_scheduled_start timestamp with time zone DEFAULT NULL::timestamp with time zone, p_scheduled_end timestamp with time zone DEFAULT NULL::timestamp with time zone, p_venue text DEFAULT NULL::text, p_is_cancelled boolean DEFAULT NULL::boolean, p_cancellation_reason text DEFAULT NULL::text |
enablelongtransactions | text | INVOKER | VOLATILE | — |
equals | boolean | INVOKER | IMMUTABLE | geom1 geometry, geom2 geometry |
execute_scheduler_sql | void | DEFINER | VOLATILE | sql_query text |
expire_stale_challenges | TABLE(expired_count integer, period_keys text[]) | DEFINER | VOLATILE | — |
find_srid | integer | INVOKER | STABLE | character varying, character varying, character varying |
generate_batch_schedule | TABLE(success boolean, message text, generated_count integer, updated_count integer, deleted_count integer, total_classes integer, execution_time_ms numeric, validation_errors jsonb) | DEFINER | VOLATILE | p_batch_id text, p_semester_number smallint DEFAULT NULL::smallint |
generate_batch_schedule | TABLE(success boolean, message text, generated_count integer, updated_count integer, deleted_count integer, total_desired_classes integer, duration_ms numeric, error_log jsonb) | DEFINER | VOLATILE | p_batch_id text, p_semester_number integer DEFAULT 5 |
generate_routing_dataset_version | jsonb | DEFINER | VOLATILE | p_min_sample_threshold integer DEFAULT 5, p_default_walk_speed_mps double precision DEFAULT 1.30, p_auto_publish boolean DEFAULT false |
geog_brin_inclusion_add_value | boolean | INVOKER | VOLATILE | internal, internal, internal, internal |
geography | geography | INVOKER | IMMUTABLE | bytea |
geography | geography | INVOKER | IMMUTABLE | geometry |
geography | geography | INVOKER | IMMUTABLE | geography, integer, boolean |
geography_analyze | boolean | INVOKER | VOLATILE | internal |
geography_cmp | integer | INVOKER | IMMUTABLE | geography, geography |
geography_distance_knn | double precision | INVOKER | IMMUTABLE | geography, geography |
geography_eq | boolean | INVOKER | IMMUTABLE | geography, geography |
geography_ge | boolean | INVOKER | IMMUTABLE | geography, geography |
geography_gist_compress | internal | INVOKER | VOLATILE | internal |
geography_gist_consistent | boolean | INVOKER | VOLATILE | internal, geography, integer |
geography_gist_decompress | internal | INVOKER | VOLATILE | internal |
geography_gist_distance | double precision | INVOKER | VOLATILE | internal, geography, integer |
geography_gist_penalty | internal | INVOKER | VOLATILE | internal, internal, internal |
geography_gist_picksplit | internal | INVOKER | VOLATILE | internal, internal |
geography_gist_same | internal | INVOKER | VOLATILE | box2d, box2d, internal |
geography_gist_union | internal | INVOKER | VOLATILE | bytea, internal |
geography_gt | boolean | INVOKER | IMMUTABLE | geography, geography |
geography_in | geography | INVOKER | IMMUTABLE | cstring, oid, integer |
geography_le | boolean | INVOKER | IMMUTABLE | geography, geography |
geography_lt | boolean | INVOKER | IMMUTABLE | geography, geography |
geography_out | cstring | INVOKER | IMMUTABLE | geography |
geography_overlaps | boolean | INVOKER | IMMUTABLE | geography, geography |
geography_recv | geography | INVOKER | IMMUTABLE | internal, oid, integer |
geography_send | bytea | INVOKER | IMMUTABLE | geography |
geography_spgist_choose_nd | void | INVOKER | IMMUTABLE | internal, internal |
geography_spgist_compress_nd | internal | INVOKER | IMMUTABLE | internal |
geography_spgist_config_nd | void | INVOKER | IMMUTABLE | internal, internal |
geography_spgist_inner_consistent_nd | void | INVOKER | IMMUTABLE | internal, internal |
geography_spgist_leaf_consistent_nd | boolean | INVOKER | IMMUTABLE | internal, internal |
geography_spgist_picksplit_nd | void | INVOKER | IMMUTABLE | internal, internal |
geography_typmod_in | integer | INVOKER | IMMUTABLE | cstring[] |
geography_typmod_out | cstring | INVOKER | IMMUTABLE | integer |
geom2d_brin_inclusion_add_value | boolean | INVOKER | VOLATILE | internal, internal, internal, internal |
geom3d_brin_inclusion_add_value | boolean | INVOKER | VOLATILE | internal, internal, internal, internal |
geom4d_brin_inclusion_add_value | boolean | INVOKER | VOLATILE | internal, internal, internal, internal |
geometry | geometry | INVOKER | IMMUTABLE | point |
geometry | geometry | INVOKER | IMMUTABLE | path |
geometry | geometry | INVOKER | IMMUTABLE | polygon |
geometry | geometry | INVOKER | IMMUTABLE | box2d |
geometry | geometry | INVOKER | IMMUTABLE | box3d |
geometry | geometry | INVOKER | IMMUTABLE | text |
geometry | geometry | INVOKER | IMMUTABLE | geometry, integer, boolean |
geometry | geometry | INVOKER | IMMUTABLE | geography |
geometry | geometry | INVOKER | IMMUTABLE | bytea |
geometrytype | text | INVOKER | IMMUTABLE | geography |
geometrytype | text | INVOKER | IMMUTABLE | geometry |
geomfromewkb | geometry | INVOKER | IMMUTABLE | bytea |
geomfromewkt | geometry | INVOKER | IMMUTABLE | text |
get_affected_gcal_users_for_batch | TABLE(user_id uuid) | DEFINER | STABLE | p_batch_id text |
get_affected_gcal_users_for_class | TABLE(user_id uuid) | DEFINER | STABLE | p_class_id uuid |
get_apod | jsonb | DEFINER | STABLE | — |
get_app_bootstrap_status | TABLE(onboarding_completed boolean, needs_force_update boolean, current_version text, current_build_number integer, version_download_link text, release_notes text, is_web_available boolean) | DEFINER | STABLE | p_version_id text DEFAULT NULL::text |
get_bus_routes | jsonb | DEFINER | STABLE | — |
get_cache_metadata | jsonb | DEFINER | VOLATILE | — |
get_class_cancellation_status | jsonb | DEFINER | VOLATILE | p_class_id uuid |
get_classes_for_calendar | jsonb | DEFINER | STABLE | p_dates text[] |
get_classes_for_date | TABLE("classId" uuid, "courseId" text, "courseCode" text, "courseName" text, "courseType" text, "courseCategory" text, "batchId" text, "scheduledStart" timestamp with time zone, "scheduledEnd" timestamp with time zone, "scheduledDate" text, venue text, "isPlusSlot" boolean, "isAbsent" boolean, "isExtraClass" boolean) | DEFINER | STABLE | p_date date |
get_classes_for_date_range | TABLE("classId" uuid, "courseId" text, "courseCode" text, "courseName" text, "courseType" text, "courseCategory" text, "batchId" text, "scheduledStart" timestamp with time zone, "scheduledEnd" timestamp with time zone, "scheduledDate" text, venue text, "isPlusSlot" boolean, "isAbsent" boolean, "isExtraClass" boolean) | DEFINER | STABLE | p_start_date date, p_end_date date |
get_classes_for_dates | jsonb | DEFINER | STABLE | p_dates text[] |
get_core_courses_for_batch | TABLE(course_id text, course_code text, course_name text, credits smallint, slot text, course_type_code course_type_code) | DEFINER | STABLE | p_batch_id text, p_semester_number integer DEFAULT 5 |
get_course_setup_for_user | TABLE(course_id text, course_code text, course_name text, course_type text, credits smallint, is_lab boolean, is_elective boolean, elective_category text, batch_id text, batch_label text, department_id text, slot text, venue text, is_recommended boolean, is_configured boolean, is_enrolled boolean, enrolled_students integer) | DEFINER | STABLE | p_batch_id text, p_semester_id uuid |
get_current_class | TABLE("classId" uuid, "courseId" text, "courseCode" text, "courseName" text, "courseType" text, "courseCategory" text, "batchId" text, "scheduledStart" timestamp with time zone, "scheduledEnd" timestamp with time zone, "scheduledDate" text, venue text, "isPlusSlot" boolean, "isAbsent" boolean, "isExtraClass" boolean) | DEFINER | STABLE | — |
get_dashboard_classes | jsonb | INVOKER | STABLE | — |
get_date_cache_key | text | DEFINER | VOLATILE | p_date date |
get_due_mess_notifications | TABLE(recipient_user_id uuid, notification_type text, payload jsonb, dedup_key text, scheduled_at timestamp with time zone) | DEFINER | VOLATILE | p_eval_time timestamp with time zone DEFAULT now(), p_window_minutes integer DEFAULT 5 |
get_elective_courses_for_batch | TABLE(course_id text, course_code text, course_name text, elective_category text, credits smallint, slot text) | DEFINER | STABLE | p_batch_id text, p_semester_number integer DEFAULT 5 |
get_elective_requirements_list | TABLE(elective_category text) | DEFINER | STABLE | p_batch_id text, p_semester_number smallint |
get_gcal_vault_secret | text | DEFINER | VOLATILE | secret_id uuid |
get_google_sync_status | TABLE(is_connected boolean, sync_status text, calendar_id text) | DEFINER | VOLATILE | — |
get_lab_courses | jsonb | DEFINER | STABLE | p_batch_id text, p_semester_number integer DEFAULT 5 |
get_lab_courses_for_batch | jsonb | DEFINER | VOLATILE | p_batch_id text, p_semester_number integer DEFAULT 5 |
get_latest_apod | TABLE(apod_date text, title text, description text, image_url text, hd_image_url text, media_type text, share_url text, copyright text, fetched_at timestamp with time zone) | DEFINER | VOLATILE | — |
get_map_data | jsonb | DEFINER | VOLATILE | — |
get_mess_menu | jsonb | DEFINER | STABLE | — |
get_missed_classes | jsonb | INVOKER | STABLE | — |
get_pipeline_health | TABLE(notification_queue_depth bigint, notification_oldest_age_seconds numeric, notification_archived_count bigint, gcal_queue_depth bigint, gcal_oldest_age_seconds numeric, gcal_archived_count bigint, needs_reauth_users_count bigint, processed_last_1h bigint, failed_last_1h bigint, pipeline_healthy boolean) | DEFINER | VOLATILE | — |
get_profile_metadata | TABLE(profile_updated_at timestamp with time zone, onboarding_completed boolean) | DEFINER | VOLATILE | — |
get_proj4_from_srid | text | INVOKER | IMMUTABLE | integer |
get_published_routing_dataset | jsonb | DEFINER | STABLE | — |
get_shortest_walk_route | jsonb | DEFINER | VOLATILE | p_origin_lat double precision, p_origin_lon double precision, p_dest_lat double precision, p_dest_lon double precision, p_dest_building_id text DEFAULT NULL::text |
get_today_classes | TABLE("classId" uuid, "courseId" text, "courseCode" text, "courseName" text, "courseType" text, "courseCategory" text, "batchId" text, "scheduledStart" timestamp with time zone, "scheduledEnd" timestamp with time zone, "scheduledDate" text, venue text, "isPlusSlot" boolean, "isAbsent" boolean, "isExtraClass" boolean) | DEFINER | STABLE | — |
get_upcoming_buses | jsonb | INVOKER | STABLE | p_user_lat double precision, p_user_lng double precision, p_max_radius_m double precision DEFAULT 800.0 |
get_upcoming_classes | TABLE("classId" uuid, "courseId" text, "courseCode" text, "courseName" text, "courseType" text, "courseCategory" text, "batchId" text, "scheduledStart" timestamp with time zone, "scheduledEnd" timestamp with time zone, "scheduledDate" text, venue text, "isPlusSlot" boolean, "isAbsent" boolean, "isExtraClass" boolean) | DEFINER | STABLE | p_limit integer DEFAULT 10 |
get_user_future_classes | TABLE(class_id uuid, course_id text, course_code text, course_name text, course_type_code text, is_plus_slot boolean, is_extra_class boolean, slot_name text, scheduled_start timestamp with time zone, scheduled_end timestamp with time zone, venue text, lat double precision, lng double precision) | DEFINER | STABLE | p_user_id uuid |
get_user_profile | jsonb | DEFINER | VOLATILE | — |
gettransactionid | xid | INVOKER | VOLATILE | — |
gidx_in | gidx | INVOKER | IMMUTABLE | cstring |
gidx_out | cstring | INVOKER | IMMUTABLE | gidx |
gin_extract_query_trgm | internal | INVOKER | IMMUTABLE | text, internal, smallint, internal, internal, internal, internal |
gin_extract_value_trgm | internal | INVOKER | IMMUTABLE | text, internal |
gin_trgm_consistent | boolean | INVOKER | IMMUTABLE | internal, smallint, text, integer, internal, internal, internal, internal |
gin_trgm_triconsistent | "char" | INVOKER | IMMUTABLE | internal, smallint, text, integer, internal, internal, internal |
gserialized_gist_joinsel_2d | double precision | INVOKER | VOLATILE | internal, oid, internal, smallint |
gserialized_gist_joinsel_nd | double precision | INVOKER | VOLATILE | internal, oid, internal, smallint |
gserialized_gist_sel_2d | double precision | INVOKER | VOLATILE | internal, oid, internal, integer |
gserialized_gist_sel_nd | double precision | INVOKER | VOLATILE | internal, oid, internal, integer |
gtrgm_compress | internal | INVOKER | IMMUTABLE | internal |
gtrgm_consistent | boolean | INVOKER | IMMUTABLE | internal, text, smallint, oid, internal |
gtrgm_decompress | internal | INVOKER | IMMUTABLE | internal |
gtrgm_distance | double precision | INVOKER | IMMUTABLE | internal, text, smallint, oid, internal |
gtrgm_in | gtrgm | INVOKER | IMMUTABLE | cstring |
gtrgm_options | void | INVOKER | IMMUTABLE | internal |
gtrgm_out | cstring | INVOKER | IMMUTABLE | gtrgm |
gtrgm_penalty | internal | INVOKER | IMMUTABLE | internal, internal, internal |
gtrgm_picksplit | internal | INVOKER | IMMUTABLE | internal, internal |
gtrgm_same | internal | INVOKER | IMMUTABLE | gtrgm, gtrgm, internal |
gtrgm_union | gtrgm | INVOKER | IMMUTABLE | internal, internal |
internal_build_desired_classes | TABLE(course_id text, scheduled_start timestamp with time zone, scheduled_end timestamp with time zone, is_plus_slot boolean) | INVOKER | STABLE | p_batch_id text, p_semester_id uuid, p_slot_system smallint, p_start_date date, p_end_date date |
internal_calculate_user_odometer | integer | DEFINER | STABLE | p_user_id uuid |
internal_get_batch_offerings | TABLE(course_id text, course_code text, course_slot text, batch_id text, is_mandatory boolean, course_type course_type_code) | DEFINER | VOLATILE | p_batch_id text, p_semester_number integer DEFAULT 5 |
internal_get_user_context | text | DEFINER | STABLE | OUT batch_id text |
internal_materialize_offering_classes | integer | DEFINER | VOLATILE | p_batch_id text, p_semester_id uuid, p_course_id text, p_slot text, p_venue text DEFAULT NULL::text |
internal_reconcile_classes | TABLE(generated_count integer, updated_count integer, deleted_count integer, total_desired_classes integer) | INVOKER | VOLATILE | p_batch_id text, p_semester_id uuid, p_slot_system smallint, p_start_date date, p_end_date date |
internal_schedule_projection | TABLE("classId" uuid, "courseId" text, "courseCode" text, "courseName" text, "courseType" text, "courseCategory" text, "batchId" text, "scheduledStart" timestamp with time zone, "scheduledEnd" timestamp with time zone, "scheduledDate" text, venue text, "isPlusSlot" boolean, "isAbsent" boolean, "isExtraClass" boolean) | DEFINER | STABLE | p_batch_id text, p_start_time timestamp with time zone DEFAULT NULL::timestamp with time zone, p_end_time timestamp with time zone DEFAULT NULL::timestamp with time zone, p_limit integer DEFAULT NULL::integer, p_upcoming boolean DEFAULT false, p_current boolean DEFAULT false |
internal_validate_batch_schedule | jsonb | DEFINER | VOLATILE | p_batch_id text, p_semester_id uuid, p_slot_system smallint, p_start_date date, p_end_date date |
is_admin | boolean | DEFINER | STABLE | — |
is_challenge_expired | boolean | INVOKER | STABLE | p_expires_at timestamp with time zone, p_grace_minutes integer DEFAULT 0 |
is_contained_2d | boolean | INVOKER | IMMUTABLE | box2df, geometry |
is_contained_2d | boolean | INVOKER | IMMUTABLE | geometry, box2df |
is_contained_2d | boolean | INVOKER | IMMUTABLE | box2df, box2df |
is_semester_locked | boolean | INVOKER | STABLE | p_semester_id uuid |
is_username_available | boolean | DEFINER | STABLE | p_username text |
json | json | INVOKER | IMMUTABLE | geometry |
jsonb | jsonb | INVOKER | IMMUTABLE | geometry |
lockrow | integer | INVOKER | VOLATILE | text, text, text, text |
lockrow | integer | INVOKER | VOLATILE | text, text, text |
lockrow | integer | INVOKER | VOLATILE | text, text, text, timestamp without time zone |
lockrow | integer | INVOKER | VOLATILE | text, text, text, text, timestamp without time zone |
longtransactionsenabled | boolean | INVOKER | VOLATILE | — |
mark_absent | jsonb | DEFINER | VOLATILE | p_class_id uuid, p_source text DEFAULT 'manual'::text, p_reason text DEFAULT NULL::text |
overlaps_2d | boolean | INVOKER | IMMUTABLE | box2df, geometry |
overlaps_2d | boolean | INVOKER | IMMUTABLE | box2df, box2df |
overlaps_2d | boolean | INVOKER | IMMUTABLE | geometry, box2df |
overlaps_geog | boolean | INVOKER | IMMUTABLE | gidx, gidx |
overlaps_geog | boolean | INVOKER | IMMUTABLE | gidx, geography |
overlaps_geog | boolean | INVOKER | IMMUTABLE | geography, gidx |
overlaps_nd | boolean | INVOKER | IMMUTABLE | geometry, gidx |
overlaps_nd | boolean | INVOKER | IMMUTABLE | gidx, gidx |
overlaps_nd | boolean | INVOKER | IMMUTABLE | gidx, geometry |
path | path | INVOKER | IMMUTABLE | geometry |
pgis_asflatgeobuf_finalfn | bytea | INVOKER | IMMUTABLE | internal |
pgis_asflatgeobuf_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement, boolean |
pgis_asflatgeobuf_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement |
pgis_asflatgeobuf_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement, boolean, text |
pgis_asgeobuf_finalfn | bytea | INVOKER | IMMUTABLE | internal |
pgis_asgeobuf_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement, text |
pgis_asgeobuf_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement |
pgis_asmvt_combinefn | internal | INVOKER | IMMUTABLE | internal, internal |
pgis_asmvt_deserialfn | internal | INVOKER | IMMUTABLE | bytea, internal |
pgis_asmvt_finalfn | bytea | INVOKER | IMMUTABLE | internal |
pgis_asmvt_serialfn | bytea | INVOKER | IMMUTABLE | internal |
pgis_asmvt_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement |
pgis_asmvt_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement, text, integer |
pgis_asmvt_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement, text, integer, text |
pgis_asmvt_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement, text, integer, text, text |
pgis_asmvt_transfn | internal | INVOKER | IMMUTABLE | internal, anyelement, text |
pgis_geometry_accum_transfn | internal | INVOKER | VOLATILE | internal, geometry, double precision |
pgis_geometry_accum_transfn | internal | INVOKER | VOLATILE | internal, geometry |
pgis_geometry_accum_transfn | internal | INVOKER | VOLATILE | internal, geometry, double precision, integer |
pgis_geometry_clusterintersecting_finalfn | geometry[] | INVOKER | VOLATILE | internal |
pgis_geometry_clusterwithin_finalfn | geometry[] | INVOKER | VOLATILE | internal |
pgis_geometry_collect_finalfn | geometry | INVOKER | VOLATILE | internal |
pgis_geometry_makeline_finalfn | geometry | INVOKER | VOLATILE | internal |
pgis_geometry_polygonize_finalfn | geometry | INVOKER | VOLATILE | internal |
pgis_geometry_union_parallel_combinefn | internal | INVOKER | IMMUTABLE | internal, internal |
pgis_geometry_union_parallel_deserialfn | internal | INVOKER | IMMUTABLE | bytea, internal |
pgis_geometry_union_parallel_finalfn | geometry | INVOKER | IMMUTABLE | internal |
pgis_geometry_union_parallel_serialfn | bytea | INVOKER | IMMUTABLE | internal |
pgis_geometry_union_parallel_transfn | internal | INVOKER | IMMUTABLE | internal, geometry, double precision |
pgis_geometry_union_parallel_transfn | internal | INVOKER | IMMUTABLE | internal, geometry |
pgmq_archive | boolean | DEFINER | VOLATILE | p_queue_name text, p_msg_id bigint |
pgmq_delete | boolean | DEFINER | VOLATILE | p_queue_name text, p_msg_id bigint |
pgmq_read | SETOF pgmq.message_record | DEFINER | VOLATILE | p_queue_name text, p_vt integer DEFAULT 180, p_qty integer DEFAULT 10 |
pgmq_send | bigint | DEFINER | VOLATILE | p_queue_name text, p_message jsonb |
pgmq_set_vt | SETOF pgmq.message_record | DEFINER | VOLATILE | p_queue_name text, p_msg_id bigint, p_vt_offset integer |
place_order | TABLE(order_id uuid, total_amount numeric) | DEFINER | VOLATILE | p_customer_id uuid, p_vendor_id uuid, p_buyer_name text, p_buyer_phone text, p_hostel text, p_room_number text, p_delivery_notes text, p_items jsonb |
point | point | INVOKER | IMMUTABLE | geometry |
polygon | polygon | INVOKER | IMMUTABLE | geometry |
populate_geometry_columns | integer | INVOKER | VOLATILE | tbl_oid oid, use_typmod boolean DEFAULT true |
populate_geometry_columns | text | INVOKER | VOLATILE | use_typmod boolean DEFAULT true |
publish_routing_dataset_version | jsonb | DEFINER | VOLATILE | p_version integer |
record_walking_trip | jsonb | DEFINER | VOLATILE | p_origin_node_id bigint, p_destination_node_id bigint, p_started_at timestamp with time zone, p_arrived_at timestamp with time zone, p_distance_meters double precision DEFAULT NULL::double precision, p_gps_fix_count integer DEFAULT 0, p_avg_accuracy_m real DEFAULT NULL::real, p_device_metadata jsonb DEFAULT '{}'::jsonb |
refresh_device_subscription | boolean | DEFINER | VOLATILE | p_old_subscription_id text, p_new_subscription_id text |
refresh_marketplace_feeds | void | DEFINER | VOLATILE | — |
register_device | uuid | DEFINER | VOLATILE | p_subscription_id text, p_platform text, p_app_version text DEFAULT NULL::text, p_device_model text DEFAULT NULL::text |
release_gcal_user_sync_lease | void | DEFINER | VOLATILE | p_user_id uuid, p_worker_id text |
remove_course_enrollment | jsonb | DEFINER | VOLATILE | p_course_id text |
report_class_cancellation | jsonb | DEFINER | VOLATILE | p_class_id uuid |
reschedule_class | jsonb | DEFINER | VOLATILE | p_class_id uuid, p_scheduled_start timestamp with time zone, p_scheduled_end timestamp with time zone, p_venue text DEFAULT NULL::text |
restore_class | boolean | DEFINER | VOLATILE | p_class_id uuid |
save_course_selection | jsonb | DEFINER | VOLATILE | p_courses jsonb DEFAULT '[]'::jsonb |
schedule_class | jsonb | DEFINER | VOLATILE | p_course_id text, p_scheduled_start timestamp with time zone, p_scheduled_end timestamp with time zone, p_venue text DEFAULT NULL::text, p_is_extra_class boolean DEFAULT false, p_is_plus_slot boolean DEFAULT false |
search_available_courses | TABLE(course_id text, course_code text, course_name text, course_type text, credits smallint, is_lab boolean, is_elective boolean, elective_category text, batch_id text, batch_label text, department_id text, slot text, venue text, is_recommended boolean, is_configured boolean, is_enrolled boolean, enrolled_students integer) | DEFINER | STABLE | p_query text, p_current_batch_id text, p_semester_id uuid, p_limit integer DEFAULT 20, p_offset integer DEFAULT 0 |
set_limit | real | INVOKER | VOLATILE | real |
show_limit | real | INVOKER | STABLE | — |
show_trgm | text[] | INVOKER | IMMUTABLE | text |
similarity | real | INVOKER | IMMUTABLE | text, text |
similarity_dist | real | INVOKER | IMMUTABLE | text, text |
similarity_op | boolean | INVOKER | STABLE | text, text |
spheroid_in | spheroid | INVOKER | IMMUTABLE | cstring |
spheroid_out | cstring | INVOKER | IMMUTABLE | spheroid |
strict_word_similarity | real | INVOKER | IMMUTABLE | text, text |
strict_word_similarity_commutator_op | boolean | INVOKER | STABLE | text, text |
strict_word_similarity_dist_commutator_op | real | INVOKER | IMMUTABLE | text, text |
strict_word_similarity_dist_op | real | INVOKER | IMMUTABLE | text, text |
strict_word_similarity_op | boolean | INVOKER | STABLE | text, text |
text | text | INVOKER | IMMUTABLE | geometry |
to_ist_date | date | INVOKER | STABLE | p_ts timestamp with time zone |
try_advisory_xact_lock | boolean | INVOKER | VOLATILE | lock_id bigint |
un_mark_absent | jsonb | DEFINER | VOLATILE | p_class_id uuid |
unlockrows | integer | INVOKER | VOLATILE | text |
update_calendar_event | TABLE(event_id uuid, was_updated boolean, updated_at timestamp with time zone) | DEFINER | VOLATILE | p_event_id uuid, p_event_name text DEFAULT NULL::text, p_start_date date DEFAULT NULL::date, p_end_date date DEFAULT NULL::date, p_event_type text DEFAULT NULL::text, p_description text DEFAULT NULL::text |
update_task | TABLE(task_id uuid, was_updated boolean, updated_at timestamp with time zone) | DEFINER | VOLATILE | p_task_id uuid, p_title text DEFAULT NULL::text, p_description text DEFAULT NULL::text, p_due_date timestamp with time zone DEFAULT NULL::timestamp with time zone, p_exam_start timestamp with time zone DEFAULT NULL::timestamp with time zone, p_exam_end timestamp with time zone DEFAULT NULL::timestamp with time zone, p_venue text DEFAULT NULL::text, p_max_score numeric DEFAULT NULL::numeric, p_attachments jsonb DEFAULT NULL::jsonb, p_is_visible boolean DEFAULT NULL::boolean |
updategeometrysrid | text | INVOKER | VOLATILE | catalogn_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer |
updategeometrysrid | text | INVOKER | VOLATILE | character varying, character varying, integer |
updategeometrysrid | text | INVOKER | VOLATILE | character varying, character varying, character varying, integer |
upsert_gcal_vault_secret | uuid | DEFINER | VOLATILE | p_user_id uuid, p_refresh_token text |
upsert_task_record | TABLE(record_id uuid, is_new_record boolean, updated_at timestamp with time zone) | DEFINER | VOLATILE | p_task_id uuid, p_status text DEFAULT NULL::text, p_obtained_marks numeric DEFAULT NULL::numeric, p_personal_note text DEFAULT NULL::text |
withdraw_cancellation_report | jsonb | DEFINER | VOLATILE | p_class_id uuid |
word_similarity | real | INVOKER | IMMUTABLE | text, text |
word_similarity_commutator_op | boolean | INVOKER | STABLE | text, text |
word_similarity_dist_commutator_op | real | INVOKER | IMMUTABLE | text, text |
word_similarity_dist_op | real | INVOKER | IMMUTABLE | text, text |
word_similarity_op | boolean | INVOKER | STABLE | text, text |
Key Architectural Functions
calculate_user_attendance_v2
Recalculates comprehensive attendance metrics for a student across all enrolled courses in an active semester.
- Security:
SECURITY DEFINER - Signature:
(p_user_id uuid, p_semester_id uuid) -> jsonb - Behavior: Queries total class occurrences matching the user's batch and enrolled electives up to the current date/time, joins against
public.absences, and computes attendance percentage:
Attendance % = ((Total Classes - Total Absences) / Total Classes) * 100Updates public.user_course_attendance_state atomically.
acquire_gcal_user_sync_lease
Implements distributed concurrency locking to ensure that at most one worker processes calendar reconciliation for a given user at any time.
- Security:
SECURITY DEFINER - Signature:
(p_user_id uuid, p_worker_id text, p_lease_seconds integer) -> boolean - Behavior: Uses
public.user_calendar_sync_leaseswith an expiration timestamp. Returnstrueif the lease was granted or safely renewed; returnsfalseif another worker holds an active lease.
claim_gcal_sync_jobs / claim_notification_jobs
Atomically claims a batch of pending queue records for asynchronous worker execution.
- Security:
SECURITY DEFINER - Mechanism: Utilizes
FOR UPDATE SKIP LOCKEDor PGMQ visibility timeout updates to guarantee lock-free parallel worker consumption without duplicate processing.
Was this page helpful?
Your feedback directly guides the engineering documentation roadmap.