Custom Parameters
Set custom key-value configuration for the endpoint.
Syntax
code
@<key> = <value>The @ prefix is optional - both @key = value and key = value work identically. Custom parameters with @ prefix are stored without the prefix (e.g., @my_param = value is stored as my_param).
Dynamic Parameter Values
Some parameters support dynamic values using the {param_name} format, where param_name references a function parameter. The value is resolved at runtime from the actual parameter value passed to the endpoint.
Example
sql
create function upload_file(_path text, _file text)
returns void
language sql
begin atomic;
-- function body
end;
comment on function upload_file(text, text) is '
@upload for file_system
@file_system_path = {_path}
@file_system_file = {_file}
';When called with {"_path": "/uploads/images", "_file": "photo.jpg"}, the file will be saved to /uploads/images/photo.jpg.
Built-in Parameters
Many annotations support the @key = value syntax. The following sections link to where each parameter group is documented.
General
These parameters are predefined annotations that also support the key = value syntax:
- BUFFER_ROWS —
buffer_rows,buffer - RAW —
raw,raw_mode,raw_results - SEPARATOR —
separator,raw_separator - NEW_LINE —
new_line,raw_new_line - COLUMN_NAMES —
columns,names,column_names - CONNECTION —
connection,connection_name
Upload
Upload handlers accept custom parameters to control file processing behavior per-endpoint:
Table Format
Per-endpoint control of HTML table and Excel spreadsheet rendering:
Server-Sent Events
SSE annotations that also support the key = value syntax:
- SSE —
sse,sse_path,sse_events_path - SSE_EVENTS_LEVEL —
sse_level,sse_events_level - SSE_EVENTS_SCOPE —
sse_scope,sse_events_scope
TypeScript Client
Per-endpoint control of generated TypeScript client code:
Related
- NpgsqlRest Options configuration - Configure default parameters
- Upload configuration - Configure upload handlers
- Table Format Options - Configure table format rendering
- Code Generation - Configure TypeScript client generation
- Comment Annotations Guide - How annotations work
- Configuration Guide - How configuration works