rds_embedding
rds_embedding · Alibaba Cloud RDS text-to-vector model invocation extension
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101140 | rds_embedding | rds_embedding | 1.0 | RAG | Unknown | C |
PostgreSQL · 14, 15, 16, 17
| Relationships | |
|---|---|
| Requires | vector |
Usage
Sources:
rds_embedding is an Alibaba Cloud ApsaraDB RDS for PostgreSQL extension that calls configured external HTTP models to turn text into vectors. Version 1.0 is provider-only, requires PostgreSQL 14 or later plus vector, and requires outbound network access from the managed instance.
Prerequisites and Setup
Use a privileged RDS account and enable the vector type before the embedding extension:
The exact minor engine must list the extension. Alibaba Cloud’s guide also requires a model-service API key and NAT/SNAT configuration because RDS PostgreSQL has no Internet access by default.
Core Workflow
Register a model with its request and response templates, then request an embedding:
Store the result in a dimension-compatible vector(n) column and use the operators supplied by vector for similarity search.
Important Objects
rds_embedding.add_model(...),rds_embedding.update_model(...), andrds_embedding.del_model(name)manage rows inrds_embedding.models.rds_embedding.show_models()lists configured models.rds_embedding.get_embedding_by_model(model, api_key, text)calls the provider and extracts the configured embedding path.- The provider lists
rds_embedding.get_response_by_model(...), but its documentation says that function is not yet available.
Operational Caveats
Model calls are remote, synchronous operations inside database statements: latency, rate limits, DNS/NAT failure, provider outages, response-shape changes, and token cost directly affect SQL. The request template and examples contain authorization material; restrict access to rds_embedding.models, function execution, query logs, and monitoring output, and rotate exposed keys. Validate %s substitution and the extraction path against the exact model response, enforce vector dimensions, and do not retry writes blindly. The extension exists only on supported ApsaraDB RDS minor engines and is governed by the managed-service lifecycle rather than an open-source release.