Database glossary
Use this glossary whenever a database term interrupts your train of thought. Search by a term, an abbreviation, or a phrase from its definition. Extension-provided concepts carry a colored source tag so you can immediately tell that they require more than the base Rent installation.
A suggested learning path
The glossary stays alphabetical for lookup, but you do not have to learn it alphabetically:
- Start with the shape of data: table, row, column, primary key, foreign key, relation, and constraint.
- Learn the application API: entity, generated client, query builder, predicate, projection, and nested write.
- Build reliable writes: transaction, ACID, isolation level, optimistic concurrency control, row lock, and retryable transaction.
- Operate production databases: migration plan, backfill, drift, connection pool, query optimizer, and EXPLAIN ANALYZE.
- Understand the engine: driver, SQL AST, schema IR, static dispatch, catalog introspection, and system catalog.
- Go deep on PostgreSQL: MVCC, WAL, autovacuum, logical replication, and the extension packs.
Loading glossary…
A structured representation of code or a query where nodes describe operations instead of raw characters. Rent builds a SQL AST first, then renders it into database-specific SQL and bound values.
The four guarantees commonly expected from a reliable transaction: atomicity, consistency, isolation, and durability. Together they describe whether a group of database changes behaves as one dependable unit.
Advisory lock
PostgreSQLA PostgreSQL lock identified by an application-chosen numeric key rather than a particular row or table. Rent uses database locking concepts like this to coordinate migration runners without creating business-data rows.
The number of rows changed by a statement. Rent uses this result for bulk operations and to detect stale optimistic-locking writes when an update matches zero rows.
A value calculated from multiple rows, such as a count, sum, average, minimum, or maximum. Aggregates can summarize a complete result or each group produced by GROUP BY.
A reusable application rule that allows, rejects, or narrows an operation before SQL reaches the database. Rent policies are useful for authorization and tenant isolation; see hooks and policies.
Array
PostgreSQLA PostgreSQL column type that stores an ordered collection of values of one element type. Arrays are useful for compact attributes, though modeled relations are usually easier to constrain and query when the values are entities of their own.
A type selected by a Rust trait implementation, such as the concrete row or database type belonging to an executor. Associated types preserve compile-time relationships but can make heterogeneous trait objects more restrictive.
The guarantee that a transaction either commits all of its changes or commits none of them. If any step fails, rollback restores the state from before the transaction.
Audit class
pgauditA category of statements that pgAudit can record, such as reads, writes, role changes, or DDL. Classes let operators choose useful audit evidence without logging every statement indiscriminately.
Autovacuum
PostgreSQLPostgreSQL’s background maintenance system for reclaiming dead-row storage, updating planner statistics, and preventing transaction-ID exhaustion. Healthy autovacuum settings are essential for sustained write workloads.
The scheduler and I/O machinery that polls Rust futures and wakes them when work can continue. Rent uses Tokio so database calls wait without blocking an operating-system thread per connection.
A Rust trait containing asynchronous methods. Modern Rust supports async fn in traits for static use, while object-safe dynamic use may still require returning an explicit future or introducing boxing.
The database engine and execution implementation beneath Rent’s shared API. Rent currently supports PostgreSQL, MySQL-compatible servers, and SQLite backends.
A migration step that computes or copies data into existing rows, often before making a new column required. Large backfills are commonly separated from schema changes so they can run in controlled batches.
A bounded collection of operations processed together. Batching reduces network overhead and prevents unbounded memory use when working through a large result set.
A value sent separately from the SQL text and represented by a placeholder such as $1 or ?. Rent renders dialect-correct placeholders and typed binds, avoiding string interpolation and its SQL-injection risks.
Binary data stored in a database or through an external-storage abstraction. Rent supports byte fields and external blob storage when large objects should live outside normal database rows.
BM25
pg_searchA relevance-ranking algorithm widely used by search engines. ParadeDB’s pg_search applies BM25 ranking to PostgreSQL data for application search, including filtering, highlighting, and facets.
Reading query results incrementally with an explicit upper bound on buffered rows or concurrent work. It keeps memory predictable and applies backpressure instead of loading an arbitrarily large result into one collection.
BRIN index
PostgreSQLA compact PostgreSQL index that records summaries for physical block ranges. BRIN works especially well for very large tables whose values correlate with row order, such as append-only timestamps.
The general-purpose ordered index used by default for many scalar columns. B-tree indexes support equality, range comparisons, and ordered scans, making them the first index type to consider for ordinary lookup fields.
An explicit table of which database features each backend supports. Rent consults capabilities before rendering migrations so unsupported operations fail clearly rather than producing dubious SQL.
How many records may participate in a relation: one-to-one, one-to-many, or many-to-many. Cardinality also describes the number of distinct values in a column when discussing query planning.
Reading a database’s own metadata to reconstruct its current schema. Rent uses a dedicated inspector for each database family because PostgreSQL, MySQL-compatible servers, and SQLite expose different catalogs.
Case-insensitive text
citextText whose equality and ordering operations ignore letter case. The citext extension is useful for email addresses, usernames, and other identifiers where Ada and ada should compare equally.
A Boolean rule enforced by the database for every inserted or updated row, such as price >= 0. It protects an invariant regardless of which application writes the data.
A digest of a migration file recorded when the migration is applied. Rent compares stored and current checksums so an already-applied migration cannot be silently edited.
Chunk
TimescaleDBA physical partition managed behind a TimescaleDB hypertable. Chunks divide time-series data by time and, optionally, another partitioning dimension.
A pair of transformations between an application value and its stored representation. Rent uses codecs for facilities such as encrypted fields and external blob values while keeping generated model types stable.
Producing Rust source from the authored schema before the application runs. Rent code generation creates models and typed builders so invalid fields and operations can fail during compilation instead of in production.
A named, typed value that every row in a table may hold. Rent schema fields generate columns plus their nullability, defaults, uniqueness, and other constraints.
The successful end of a transaction, making all of its changes durable and visible according to the database’s isolation rules.
A key formed from two or more columns. Compound keys are common in join tables and are also useful when a business identity is naturally a combination of values.
COPY
PostgreSQLPostgreSQL’s high-throughput protocol for moving rows between a client and a table. Rent exposes typed generated CSV COPY builders for trusted ingestion jobs where returning each inserted model and running per-row middleware are not required.
Concurrent index
PostgreSQLA PostgreSQL index built with CREATE INDEX CONCURRENTLY, allowing writes to continue during most of the build. It takes longer and has special transaction restrictions, but reduces blocking on production tables.
Nested-write operations that add or remove a relationship without deleting either related record. For many-to-many relations, Rent changes the relevant join-table rows inside the surrounding transaction.
The ACID property that a transaction moves the database from one valid state to another while preserving declared constraints and invariants.
A managed set of reusable database connections shared by asynchronous tasks. Pool bounds prevent an application from opening unlimited connections, while acquisition timeouts expose saturation instead of waiting forever.
A database-enforced rule such as a primary key, foreign key, uniqueness rule, check, or non-null requirement. Constraints are the final line of defense for data integrity.
Continuous aggregate
TimescaleDBA TimescaleDB materialized summary that refreshes incrementally as new time-series data arrives. It makes dashboards and long-range rollups much cheaper than repeatedly scanning raw measurements.
An independent implementation used to verify expected behavior. A differential test gives two systems the same input and compares their normalized outputs and final database state, reducing the chance that implementation assumptions are mistaken for correctness.
Cosine distance
pgvectorA vector-distance measure based on the angle between two vectors rather than their magnitude. It is commonly used to compare normalized embeddings in semantic search.
A bulk operation that inserts multiple records through one logical API call. Rent keeps the operation atomic when the backend requires multiple SQL statements.
Rust’s unit of packaging, compilation, and dependency reuse. Rent is a workspace of focused crates for schemas, SQL, drivers, migrations, code generation, extensions, and the public client API.
Cron expression
pg_cronA compact schedule such as 0 3 * * * describing when a database job should run. pg_cron stores schedules in PostgreSQL and executes their SQL on the configured cadence.
The four basic persistent-data operations: create, read, update, and delete. Rent generates typed builders for these operations from the authored RSL schema.
A stable position in an ordered result set used to fetch the next or previous page. Unlike a row offset, a cursor identifies ordering values rather than how many rows to skip.
The set of values a field may contain and the operations valid for those values. Rent maps Rust-facing types to each supported SQL dialect and rejects unsupported conversions.
Data Definition Language: SQL statements that create or change database structure, such as CREATE TABLE, ALTER TABLE, and DROP INDEX. DDL transaction behavior differs substantially between database engines.
The declared structure of stored data: tables, columns, relations, indexes, and constraints. In PostgreSQL, schema also names a namespace inside one database; see PostgreSQL schema.
Dead tuple
PostgreSQLAn obsolete row version left behind by an update or delete under PostgreSQL’s MVCC design. Vacuum eventually makes its storage reusable.
A cycle where transactions each hold a lock another one needs, so none can proceed. Databases detect the cycle and abort one participant; applications should keep transactions small and retry suitable failures.
Deferrable constraint
PostgreSQLA constraint that may be checked at transaction commit instead of after each statement. Deferral helps with coordinated changes that temporarily violate a relationship but are valid by commit time.
An operation that removes matching rows. Foreign-key actions determine whether related rows are rejected, cascaded, or changed to NULL.
A Rust procedural macro invoked through #[derive(...)] to generate implementations from a type declaration. Rent
uses derives internally where they are useful, while application models are authored centrally in
rent/schema.rsl and compiled into generated Rust.
A schema change that can delete data or make existing values unrepresentable, such as dropping a column. Rent identifies destructive plans and requires explicit approval before applying them.
A database family’s particular SQL syntax and behavior. Rent renders typed operations for PostgreSQL, MySQL, MariaDB, and SQLite while exposing deliberate escape hatches for backend-specific features.
Digest
pgcryptoA one-way cryptographic fingerprint of data. pgcrypto provides digest functions for integrity checks; password storage should use a purpose-built password-hashing algorithm rather than a plain fast digest.
A migration recorded as started but not successfully completed. Rent refuses to proceed blindly and provides an explicit repair workflow so operators can reconcile history with actual database state.
Data Manipulation Language: SQL statements that read or change table data, principally SELECT, INSERT, UPDATE, and DELETE. Rent’s generated client builds typed DML operations.
Domain
PostgreSQLA named PostgreSQL type built on another type with reusable constraints, such as a validated email address. Rent can inspect and represent domains while providing portable fallbacks on other databases.
A difference between the schema expected from migration history and the schema actually present in a database. Drift often indicates manual DDL or a partially applied operational change.
The layer that opens connections, binds values, executes rendered statements, and decodes database responses. Rent presents one driver facade while dispatching to concrete SQLx PostgreSQL, MySQL-compatible, or SQLite implementations.
The ACID guarantee that committed data survives process failure or restart according to the database’s durability configuration.
Choosing an implementation at runtime through a trait object and virtual call. Dynamic dispatch enables open-ended implementations, usually in exchange for type erasure, object-safety constraints, and a small indirection cost.
Fetching requested related records as part of a planned query operation instead of waiting for later access. Rent batches relationship loads to avoid an N+1 query pattern.
Embedding
pgvectorA numeric vector that represents the meaning or features of text, an image, or another object. Storing embeddings with pgvector enables similarity search alongside relational filters.
Protecting stored values as ciphertext so a raw database read does not reveal plaintext. Rent’s field codec supports authenticated AES-256-GCM encryption with application-managed keys.
A modeled application object such as User, Post, or Comment. A Rent entity normally maps to a table and generates a typed model plus builders for its operations.
A field restricted to a named set of variants, such as Draft, Published, and Archived. The database representation varies by dialect, but the generated Rust API remains typed.
Selecting a concrete implementation by matching an enum variant. Rent uses enum dispatch for its fixed database set, which keeps SQLx’s concrete pool types and makes the compiler identify every place that a newly added backend must handle.
Exclusion constraint
PostgreSQLA PostgreSQL constraint requiring selected operator comparisons between rows not to all be true. It can prevent overlapping bookings or conflicting geometric ranges when uniqueness alone is insufficient.
The operators a database chooses to execute a statement, including scans, joins, sorts, and aggregates. The plan—not the surface shape of the SQL—determines how the query actually performs.
EXPLAIN
PostgreSQLA command that shows the execution plan PostgreSQL intends to use without running the query. It is the starting point for understanding scans, joins, estimated rows, and planner costs.
EXPLAIN ANALYZE
PostgreSQLAn execution plan augmented with measurements from actually running the statement. Because it executes the query, use it carefully with writes and expensive production workloads.
Expression index
PostgreSQLAn index over a computed expression rather than a plain column, such as lower(email). Queries must use a compatible expression for PostgreSQL to use the index.
A Rent crate that registers a PostgreSQL extension’s types, functions, operators, migrations, capability checks, and higher-level client. Registration makes the dependency and its operational requirements explicit.
A read-only check that compares an extension request with a live PostgreSQL server and its hosting policy. Rent reports availability, compatible versions, dependencies, privileges, and preload requirements before a migration attempts installation.
Facet
pg_searchA count or summary grouped by a field within search results, such as products per brand. Facets let an interface show useful filters without a separate search system.
A Cargo-controlled switch that includes optional code or dependencies at compile time. Feature flags keep applications from compiling database drivers or capabilities they do not use.
A typed property declared on a Rent entity. Code generation turns fields into model members, setters, selectors, predicates, and migration columns.
An insert-or-update operation exposed as a typed generated builder rather than handwritten SQL. Rent renders the backend’s native conflict behavior and keeps the operation atomic.
A constraint requiring a value to reference an existing key in another table. It enforces relational integrity and may define CASCADE, RESTRICT, or SET NULL behavior for updates and deletes.
Searching documents by parsed words and relevance instead of exact substrings. PostgreSQL has native text-search primitives, while pg_search provides a richer BM25-oriented search engine inside PostgreSQL.
The schema-specific Rust API produced by rent generate. It exposes typed models, fields, predicates, CRUD builders, relations, transactions, and registered capabilities.
A column whose value the database calculates from other values in the row. Rent migration inspection preserves generated-column definitions instead of treating them as ordinary writable fields.
Geography
PostGISA PostGIS type modeling locations on the earth’s curved surface. Geography makes real-world distance queries convenient, with different performance and operation tradeoffs from planar geometry.
Geometry
PostGISA PostGIS type for points, lines, polygons, and other shapes in a coordinate system. Geometry supports a broad set of spatial operations and indexes.
GIN index
PostgreSQLA PostgreSQL inverted index suited to values containing multiple searchable elements, including arrays, jsonb, full-text vectors, and extension operator classes such as trigrams.
GiST index
PostgreSQLA flexible PostgreSQL index framework used for spatial data, ranges, nearest-neighbor searches, exclusion constraints, and several extension-defined operator classes.
A query clause that partitions matching rows into groups before aggregate functions run. Rent’s typed grouping API returns projections matching the selected keys and aggregates.
Highlight
pg_searchA search-result snippet that marks or extracts matching text. pg_search can generate highlights alongside ranked results so applications can explain why a document matched.
HMAC
pgcryptoA keyed digest that verifies both data integrity and knowledge of a secret. pgcrypto provides HMAC functions for database-side verification workflows.
HNSW index
pgvectorAn approximate nearest-neighbor vector index with strong query performance and recall. It generally uses more memory and takes longer to build than IVFFlat but does not require a training step.
Reusable code that surrounds a mutation. Rent hooks can validate, rewrite, observe, or reject writes while remaining inside the mutation’s transaction boundary.
HOT update
PostgreSQLA PostgreSQL optimization that avoids creating new index entries when an update does not change indexed columns and space is available on the same page.
A group of rows that supplies the same columns in the same order. Rent can render such a group as one multi-row insert on backends with suitable return support; rows with different defaulted or omitted fields use a safe fallback.
Hypertable
TimescaleDBA TimescaleDB table automatically partitioned into time-based chunks while retaining a normal table-like SQL interface. It is the foundation for TimescaleDB time-series features.
The property that repeating an operation has the same intended effect as performing it once. It is especially important for retried migrations, background jobs, and externally triggered writes.
Identity column
PostgreSQLA standards-oriented PostgreSQL column that generates values from an associated sequence. It is the modern alternative to the older serial shorthand.
A schema rename that explicitly states which old table or column became the new one. @rent.previousName("old_name") lets the migration planner emit a rename and preserve data instead of guessing that one object was dropped and another was added.
An auxiliary data structure that helps the database find rows without scanning an entire table. Indexes accelerate selected reads but consume storage and add work to writes.
Inner-product distance
pgvectorA vector comparison based on the dot product. It is useful for models trained for maximum inner-product search and may require normalized inputs depending on model semantics.
Reusable middleware around queries and relation traversals. Rent interceptors can add tenant filters, record telemetry, alter a request, or reject it before execution.
A stable internal model positioned between authored input and generated output. Rent’s schema IR lets code generation and migrations consume the same validated meaning without depending directly on Rust syntax.
A transaction setting controlling which concurrent changes can be observed and which anomalies are permitted. Stronger levels simplify reasoning but can increase waits, aborts, and required retries.
IVFFlat index
pgvectorAn approximate vector index that divides vectors into lists and searches selected lists. It builds quickly and uses less memory than HNSW, but requires representative data and tuning of lists and probes.
A query operation combining rows from two or more relations using matching conditions. Generated relationship traversal lets Rent plan joins or batched loads without handwritten SQL.
A table whose rows connect records from two other tables. A many-to-many relation commonly uses a join table with a compound key over both foreign keys.
A portable text format for nested objects, arrays, strings, numbers, Booleans, and nulls. Rent can map typed Rust structures to JSON-valued fields.
JSON Schema
pg_jsonschemaA standard vocabulary for describing and validating the shape of JSON documents. pg_jsonschema lets a PostgreSQL constraint reject JSON values that do not satisfy a selected schema.
JSONB
PostgreSQLPostgreSQL’s decomposed binary JSON format. It supports containment, path, and indexing operations and is usually preferred over textual json when values will be queried.
A cursor containing the ordered field values from a page boundary. The next query seeks past those values, producing stable, index-friendly pagination without scanning an ever-growing offset.
K-nearest neighbors
PostgreSQLA query that returns the k items closest to a target under a distance operator. PostgreSQL GiST and extension indexes such as pgvector’s HNSW can accelerate this ordering pattern.
LATERAL join
PostgreSQLA PostgreSQL join whose right-hand subquery may refer to columns from preceding FROM items. It is useful for per-row calculations and top-N related records.
Fetching a related record only when application code requests it. It can be convenient but easily creates N+1 queries, so Rent favors explicit eager-loading plans for known relationships.
LISTEN and NOTIFY
PostgreSQLPostgreSQL’s lightweight session notification mechanism. It is useful for wake-up signals and cache invalidation, but it is not a durable queue and payloads should not be treated as persistent messages.
Logical replication
PostgreSQLA PostgreSQL mechanism for publishing row-level changes decoded from WAL. It powers selective replication, change-data capture, and many zero-downtime migration workflows.
The explicit distinction between a relationship that was fetched and one that was not requested. Generated relation accessors return the loaded value or a typed error, so an empty relation cannot be confused with missing eager-loading work.
Time spent waiting for another transaction to release a conflicting lock. Persistent lock waits usually indicate transactions that are too broad, inconsistent lock ordering, or missing query indexes.
A relationship in which records on either side may connect to many records on the other. A join table stores each connection; see the many-to-many tutorial.
A relationship where many source records may reference one target record, such as many comments belonging to one post. The foreign key normally lives on the many side.
Materialized view
PostgreSQLA stored snapshot of a query result that can be refreshed. Reads can be much faster than recomputing the query, at the cost of refresh work and potentially stale results.
A versioned change that moves a database schema forward. Rent can inspect, diff, plan, apply, validate, and audit migrations through its migration CLI.
The state where applying a migration and diffing again produces no further operations. Rent tests fixed points to prove that its desired and inspected schema representations converge.
The append-only record of which migrations ran, in what order, with which checksum, and whether each completed. Rent keeps this metadata in a dedicated database table.
A database lock preventing two processes from applying migrations simultaneously. It avoids races between application instances during deployment.
The rent.sum file that records a digest for every migration file. Validation rejects missing, added, reordered, or modified history before any pending migration runs.
The ordered operations required to transform the inspected current schema into the desired schema. Reviewing the plan exposes destructive changes before execution.
A read-only inspection that calculates the pending plan, validates its SQL for the selected backend, and classifies each operation as safe, review-required, or destructive. It is the early warning step before writing or applying a migration.
A deterministic test implementation that records expected statements and returns scripted rows or failures without a live database. Rent uses it for precise builder and error-path tests, while its SQL matrix supplies separate end-to-end proof.
Rust’s compilation of generic code into concrete machine-code versions for the types actually used. It enables zero-cost generic abstraction but can increase compile time and binary size when many combinations are instantiated.
MVCC
PostgreSQLMulti-version concurrency control: readers observe a transactionally valid snapshot while writers create new row versions. MVCC reduces reader-writer blocking but requires vacuum to reclaim obsolete versions.
A performance problem where one query loads a list and then one additional query runs for every item. Rent’s relationship batching and eager loading turn that growing request count into bounded work.
A write that changes one entity and its relationships through a single builder. Rent runs the component statements in one transaction so partial relationship state cannot escape.
A family of relational-design rules that reduce duplication and update anomalies by separating facts into appropriately related tables. Denormalization can be deliberate when measured read performance justifies it.
A column constraint prohibiting SQL NULL. In a Rent schema, a required field generates non-nullable storage unless another mapping explicitly changes it.
SQL’s marker for a missing or unknown value. It is not equal to anything, including another NULL, so predicates use IS NULL and IS NOT NULL rather than ordinary equality.
Object audit logging
pgauditA pgAudit mode that records selected operations on explicitly chosen relations. It is useful when a small set of sensitive tables needs stronger evidence than the rest of the database.
The rules determining whether a Rust trait can be used behind dyn Trait. Methods involving certain generic or Self-dependent shapes are not object-safe, which is one reason a closed enum can be simpler than a pluggable driver trait.
Pagination using LIMIT plus a count of rows to skip. It is simple and supports arbitrary page numbers, but deep pages get slower and concurrent inserts can shift results between requests.
A relationship where one source record connects to many target records, such as one post having many comments. The target records usually carry the foreign key.
A relationship where each record connects to at most one record on the other side. It is commonly enforced with a unique foreign key.
Detecting conflicting writes without holding a lock while the user or application does work. Rent’s version fields add the old version to the update predicate, increment it atomically, and return a stale-write error if another writer won.
A query clause defining result order. Stable pagination requires a deterministic order, usually ending with a unique field to break ties.
A cursor whose internal ordering values are encoded behind a stable string boundary. Applications can pass it through an API without exposing or reconstructing its tuple shape, while Rent still decodes it into the generated key type.
A type, function, table, index, or other object installed and managed by an extension. Rent extension lifecycle checks distinguish owned objects from application objects so upgrades and removal are safe.
Partial index
PostgreSQLAn index containing only rows that satisfy a predicate, such as active accounts or unprocessed jobs. It can be smaller and more selective than an index over the entire table.
The token occupying a bound value’s position in SQL, such as PostgreSQL’s $1 or MySQL and SQLite’s ?. Rent assigns placeholders while rendering and sends the actual typed values separately.
A physical subdivision of a logical table, usually selected by range, list, or hash. Partitioning helps manage very large datasets, retention, and maintenance when queries align with the partition key.
Partition pruning
PostgreSQLPostgreSQL’s ability to skip partitions that cannot satisfy a query predicate. Queries need useful constraints on the partition key for pruning to be effective.
Partition set
pg_partmanA parent table plus the child partitions, schedule, and maintenance configuration managed by pg_partman. The extension can create future partitions and retire old ones automatically.
PGP encryption
pgcryptoOpenPGP-compatible encryption and decryption performed by pgcrypto. It supports symmetric and public-key workflows but requires careful key access and threat-model decisions.
pg_cron
pg_cronA PostgreSQL extension that schedules recurring SQL jobs inside the database. Use it for database-local maintenance and periodic transformations; see the pg_cron guide.
pg_jsonschema
pg_jsonschemaA PostgreSQL extension for validating json and jsonb values against JSON Schema. It moves document-shape enforcement into database constraints; see the pg_jsonschema guide.
pg_net
pg_netA PostgreSQL extension that queues asynchronous HTTP requests from SQL. It can trigger webhooks or call services without holding the originating transaction open for network I/O; see the pg_net guide.
pg_partman
pg_partmanA PostgreSQL extension for creating and maintaining time- or number-based partition sets. It automates future partition creation and retention; see the pg_partman guide.
pg_search
pg_searchParadeDB’s PostgreSQL extension for BM25-ranked full-text search with filters, facets, and highlighting. It keeps search close to transactional data; see the pg_search guide.
pg_trgm
pg_trgmA PostgreSQL extension for trigram similarity and indexed fuzzy string matching. It is useful for typo tolerance and %pattern% searches; see the pg_trgm guide.
pgAudit
pgauditA PostgreSQL extension that emits detailed session or object audit records through PostgreSQL logging. It helps satisfy evidence and compliance requirements; see the pgAudit guide.
pgcrypto
pgcryptoA PostgreSQL extension providing cryptographic hashes, HMAC, password hashing, random data, and PGP encryption. See the pgcrypto guide.
pgmq
pgmqA durable message queue implemented in PostgreSQL. Rent provides a typed queue client for sending, reading, archiving, and deleting messages; see the pgmq guide.
pgvector
pgvectorA PostgreSQL extension for storing and searching vectors. It supports exact and approximate nearest-neighbor search with multiple distance measures; see the pgvector guide.
PostGIS
PostGISPostgreSQL’s leading geospatial extension, adding spatial types, functions, operators, and indexes. Use it for maps, proximity, containment, and routing data; see the PostGIS guide.
PostgreSQL schema
PostgreSQLA namespace inside one PostgreSQL database containing tables, types, functions, and other objects. Schemas can organize modules or tenants, but permissions and search_path must be configured deliberately.
Temporary exclusive use of one connection from a pool. A lease must return on success, error, rollback, or cancellation so abandoned tasks cannot slowly exhaust the application’s connections.
A typed condition used to decide which records an operation targets. Rent exposes compact field predicates such as .id_eq(1) and composes them with relationship and logical predicates.
Premake
pg_partmanThe number of future partitions pg_partman creates ahead of the current interval. Enough premade partitions prevent inserts from reaching an interval with no destination.
SQL parsed separately from its bound values and reusable across executions. Prepared statements improve safety and may reduce repeated parsing work.
The column or columns that uniquely identify every table row and reject NULL. Relationships normally reference a primary key or another unique key.
A query result containing selected fields rather than the full entity model. Projections reduce transferred data and give the caller a result type matching exactly what was selected.
Known operational rules for a PostgreSQL hosting environment, layered over capabilities discovered from the actual server. It lets extension preflight explain provider restrictions without pretending every deployment of PostgreSQL is configured identically.
Rust code that runs during compilation to transform token streams into more Rust code. Rent keeps procedural macros for internal compatibility tests and typed extension packages; application models live in RSL and generate ordinary Rust modules.
A typed API that incrementally describes filters, ordering, projections, pagination, and relationship loading before execution. The builder does not make a database round trip until a terminal method such as .all().await? runs.
The database component that compares valid execution strategies and chooses a plan using statistics and estimated costs. Good indexes and fresh statistics give the optimizer better choices; application query shape alone does not guarantee a particular plan.
Queue archive
pgmqMoving a processed message out of an active PGMQ queue into its archive rather than permanently deleting it. Archives support later inspection and operational debugging.
An intentional route from the typed API to parameterized SQL for a capability the generated surface does not model. It preserves access to the full database without forcing every specialized operation into Rent’s core API.
Recursive CTE
PostgreSQLA common table expression that can refer to its own accumulated result. It is useful for hierarchies, dependency walks, and other recursive relational queries.
A modeled association between entities, backed by a foreign key or join table. Rent uses relations for traversal, eager loading, nested writes, and generated relationship predicates.
The query shape used to fetch requested relationships. Rent’s Auto strategy chooses between a joined statement and
batched select-in loading; applications can explicitly request Join or SelectIn when they need to control the
round-trip and row-expansion tradeoff.
A condition on related records, such as users who have a published post or posts with no comments. Rent translates the typed relation condition into the necessary join or existence query.
An eager-loading strategy that fetches parent rows, gathers their keys, and retrieves related rows with a bounded
WHERE key IN (...) query. It avoids N+1 queries and avoids the repeated parent columns that a large collection join
can produce.
The component that converts Rent’s database-neutral SQL representation into a concrete statement and ordered bind values for one dialect. Rendering handles details such as quoting, placeholders, operators, and backend-only syntax.
Retention policy
TimescaleDBA TimescaleDB automation that removes chunks older than a configured interval. It enforces time-series data lifetime without a recurring application delete job.
A transaction that can safely be attempted again after a transient conflict such as a serialization failure. Rent’s bounded helper rolls back before retrying, waits with backoff, records tracing events, and stops at the configured limit.
Ending a transaction without committing its changes. Rent automatically rolls a closure transaction back when the closure returns an error.
One record in a relational table. A generated Rent model represents the typed values read from a row.
Row-level security
PostgreSQLPostgreSQL policies that restrict which rows a database role can select or modify. RLS can provide defense in depth for tenancy and authorization beneath application policies.
A lock held on selected rows until a transaction ends. Pessimistic locking is useful when conflicting work must be serialized rather than detected later through a version field.
Converting a driver’s returned columns into Rust values and then into a generated model or projection. Rent reports missing, nullability, type, and conversion failures instead of silently manufacturing values.
A named checkpoint inside a transaction. Rolling back to it undoes later work while preserving earlier changes and keeping the outer transaction active.
A single, non-relational value such as a number, string, Boolean, UUID, or timestamp. Scalar fields contrast with relations and collection-valued structures.
A durable, reviewable change to database structure. Rent derives desired structure from RSL schemas and records ordered migration files instead of mutating production opportunistically.
Rent’s validated, normalized representation of entities, fields, relations, indexes, and database objects. Both client generation and migration planning consume this shared meaning.
Search path
PostgreSQLThe ordered PostgreSQL schemas searched when an object name is not schema-qualified. An unsafe search_path can resolve the wrong object, so applications should configure it explicitly.
The fraction of rows expected to match a condition. Highly selective predicates often benefit most from indexes; the optimizer uses statistics to estimate selectivity.
Sequence
PostgreSQLA PostgreSQL object that safely generates numeric values across concurrent sessions. Identity columns commonly use a sequence behind the scenes.
A database error indicating that concurrent transactions could not all behave as if executed serially. The transaction must roll back, and an idempotent unit of work may then be retried with a bound.
Finding items close to a query under a chosen distance or similarity measure rather than requiring exact equality. pgvector handles numeric embeddings, while pg_trgm handles character-trigram similarity.
An isolation model where a transaction reads from a consistent snapshot while concurrent writers proceed. Conflicting updates may still require aborts or application retries.
Spatial index
PostGISAn index that narrows spatial searches using bounding relationships before exact geometry calculations. PostGIS commonly uses GiST indexes for containment, intersection, and proximity workloads.
SRID
PostGISA Spatial Reference System Identifier attached to geometry or geography data. Matching SRIDs ensure coordinates are interpreted in compatible reference systems.
The language relational databases use to define structure and read or modify data. Rent generates parameterized SQL while keeping models, predicates, and results typed in Rust.
An abstract syntax tree specifically representing SQL operations, expressions, identifiers, and bound arguments. Rent creates one shared AST and gives its renderer the selected dialect rather than maintaining a separate query builder for every database.
The asynchronous Rust SQL toolkit beneath Rent’s concrete connection pools and transactions. Rent adds schema-driven generation, a shared query model, migrations, policies, and extension APIs above SQLx.
An attempted update based on an entity version that is no longer current. Rent reports a dedicated stale-write error so the application can reload, merge, retry, or ask the user to resolve the conflict.
Statement timeout
PostgreSQLA PostgreSQL limit that cancels a statement after it runs too long. It bounds resource use and tail latency but should be paired with application-level deadlines and error handling.
Resolving an implementation without a runtime trait-object lookup. Rent’s backend enums use exhaustive matches, while Rust generics may use monomorphization; both preserve concrete types and make missing backend cases compile-time failures.
ST_DWithin
PostGISA PostGIS predicate testing whether two spatial values are within a specified distance. It can use a suitable spatial index and is preferable to computing every exact distance before filtering.
An identifier created solely to identify a row, such as an integer or UUID, rather than derived from business data. It gives relationships a stable target when natural values can change.
Recording events as a message plus typed or named fields instead of only formatted text. Rent uses the tracing ecosystem so database operations can carry context through asynchronous execution.
Database-owned tables or views describing schemas, columns, indexes, constraints, extensions, and other objects. Catalog layouts are backend-specific, so migration inspection cannot use one universal SQL query.
A named collection of rows sharing a defined set of columns and constraints. Rent entities normally generate or map to tables.
A predicate restricting an operation to the current customer, organization, or workspace. Rent can apply it centrally through policies and interceptors so individual queries do not have to remember it; see tenancy.
The design for keeping multiple customers’ data and operations isolated within shared or separate infrastructure. Rent documents application policies, database constraints, and PostgreSQL RLS as complementary layers.
TimescaleDB
TimescaleDBA PostgreSQL extension for time-series storage, partitioning, compression, retention, and continuous aggregates. See the TimescaleDB guide.
TOAST
PostgreSQLPostgreSQL’s mechanism for compressing or moving large field values out of the main table row. It operates transparently but affects the cost of repeatedly reading large values.
Tokenizer
pg_searchA search component that turns source text into indexable terms. Tokenizer choice controls handling of language, punctuation, case, and specialized identifiers.
The asynchronous runtime Rent uses for task scheduling, timers, synchronization, and nonblocking database I/O. Tokio drives the futures returned by Rent’s generated client and SQLx.
A structured interval representing work such as a query or transaction, with fields and nested events attached to it. Spans let tracing subscribers correlate asynchronous activity without relying on thread identity.
Rust’s way to describe shared behavior that multiple types can implement. Traits are valuable for open extension points, but a closed enum may be clearer when every supported implementation is known and has materially different concrete types.
A runtime value such as Box<dyn Trait> or Arc<dyn Trait> that hides its concrete implementation behind an object-safe trait. It enables pluggability but gives up some static type information.
A group of database operations that commits or rolls back as one unit. Rent supports closure transactions, explicit options, savepoints, retries, and typed generated operations inside the same boundary; see transactions.
The execution context that ensures generated operations use the same open transaction rather than borrowing a fresh pooled connection. Rent’s entity executor can wrap either a pool, an owned transaction, or its deterministic test driver.
Updating an entity and adding or removing its many-to-many connections inside one transaction. If any scalar update, version check, or join-table change fails, Rent rolls the entire operation back.
Trigram
pg_trgmA group of three consecutive characters used to compare text similarity. pg_trgm can index trigrams for typo-tolerant matching and fast wildcard searches.
An internal value representation that is not tied to one SQLx database type. Rent converts these values into PostgreSQL, MySQL-compatible, or SQLite binds only at the driver boundary.
An ordered collection of values. In relational language it often means a row; in APIs it can also represent a composite cursor or compound key.
Hiding a value’s concrete type behind a common interface or container. It can make heterogeneous runtime composition possible, while moving some guarantees from compile time to runtime.
Selecting several named fields into a generated Rust result type instead of loading the complete entity. The compiler then checks field types and prevents callers from accessing data the query did not select.
A generated Rust structure containing the values required to create one entity. It makes missing required values a compile error, while fluent setters remain available for optional values and generated identifiers.
A query whose fields, operators, bound values, and result shape are checked through Rust types before it executes. Rent still validates runtime database failures and returns them as typed errors.
A database rule preventing duplicate values across one or more columns. Unique constraints also define valid conflict targets for upserts.
An atomic operation that inserts a row or updates an existing row when a selected uniqueness conflict occurs. See first-class upsert.
An application type mapped through Rent’s schema and value-conversion boundaries instead of using only built-in primitives. It preserves domain meaning in Rust while defining how the value is stored.
A 128-bit identifier designed to be unique without a single central counter. Different UUID versions encode randomness, time, or names; storage order can materially affect index locality.
UUID versions 1, 3, 4, and 5
uuid-osspUUID generation algorithms provided by uuid-ossp: time-and-node based v1, namespace-based v3 and v5, and random v4. New applications should choose a version based on privacy, determinism, and index-locality needs.
Vacuum
PostgreSQLPostgreSQL maintenance that makes storage from dead tuples reusable, updates visibility information, and freezes old transaction IDs. Ordinary vacuum does not usually return disk space to the operating system.
Vector
pgvectorA fixed-dimensional numeric value stored by pgvector. Vector distance operators support semantic search, recommendation, clustering, and other nearest-neighbor workloads.
A field incremented on every successful update and included in the update predicate. Rent’s @rent.version annotation generates the compare-and-increment behavior automatically.
A named query exposed like a table. Views can centralize joins, filters, and read models without storing a separate copy of the result.
The period after a queue consumer reads a message during which other consumers cannot see it. If processing does not archive or delete the message before the timeout, it becomes available for retry.
WAL
PostgreSQLPostgreSQL’s write-ahead log, which records changes before modified data pages are persisted. WAL supports crash recovery, physical replication, point-in-time recovery, and logical decoding.
Window function
PostgreSQLA calculation across rows related to the current row without collapsing them into one aggregate result. Window functions power ranking, running totals, moving averages, and previous-row comparisons.
The binary or textual message format a database client and server exchange over a connection. SQLx implements each supported protocol; Rent operates above it through pools, typed binds, and decoded rows.
A staged schema change that keeps old and new application versions working during deployment. The common pattern expands compatibility first, backfills data, switches application reads and writes, and removes old structure only after it is unused.