You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature was designed to allow parameters not normally known to PostgreSQL to be added by add-on modules (such as procedural languages). This allows extension modules to be configured in the standard ways.
Custom options have two-part names: an extension name, then a dot, then the parameter name proper, much like qualified names in SQL. An example is plpgsql.variable_conflict.
Because custom options may need to be set in processes that have not loaded the relevant extension module, PostgreSQL will accept a setting for any two-part parameter name. Such variables are treated as placeholders and have no function until the module that defines them is loaded. When an extension module is loaded, it will add its variable definitions, convert any placeholder values according to those definitions, and issue warnings for any unrecognized placeholders that begin with its extension name.
Does pgx provide a way to add/register variables for an extension?
The text was updated successfully, but these errors were encountered:
Hi there! pgx sure does. It provides a few safe wrappers into Postgres' GUC (grand unified configuraiton) system. Sadly, pgx' docs for this aren't great right now, but there's a fairly complete (and working!) example of all this in ZomboDB: https://github.com/zombodb/zombodb/blob/master/src/gucs/mod.rs
Postgres has support for extension variables:
Does pgx provide a way to add/register variables for an extension?
The text was updated successfully, but these errors were encountered: