3.32. Transforms
A transform, as stated by the PostgreSQL docs, specifies how to adapt a data type to a procedural language. For example, when writing a function in PL/Python using the hstore type, PL/Python has no prior knowledge of how to present hstore values in the Python environment. Language implementations usually default to using text representation. If there's a need to do any special treatment of a data type in a procedural language environment, a transform object is ideal for this task.
123456
| Attributes | |||
|---|---|---|---|
| # | Field | Group box | Description |
| 1 | Type | Data type | The data type. Besides the built-in types, the list also holds the user-defined types, domains and other types of the model. |
| 2 | Dimension | Data type | Number of dimensions when the type is an array ( |
| 3 | Format | Data type | Read-only preview of the data type as it is written in the SQL code, with length, precision, dimension and other modifiers applied. |
| 4 | Language | The language in which the transform operates. | |
| 5 | From SQL | The function that converts the type from the SQL environment to the language. It must take one argument of type | |
| 6 | To SQL | The function that converts the type from the language to the SQL environment. It must take one argument of type | |
References
Transform DDL
https://www.postgresql.org/docs/current/static/sql-createtransform.html