Cast¶
Defines an cast
Properties¶
| Property | Type | Required | Description |
|---|---|---|---|
schema |
string |
— | Schema. |
owner |
string |
— | The role that owns the cast. |
source_type |
string |
yes | Source Type. |
target_type |
string |
yes | Target Type. |
sql |
string |
— | User-provided raw SQL snippet. |
function |
string |
— | The function used to perform the cast. The function name can be schema-qualified. If it is not, the function will be looked up in the schema search path. The function's result data type must match the target type of the cast. Its arguments are discussed below. |
inout |
boolean |
— | Indicates that the cast is an I/O conversion cast, performed by invoking the output function of the source data type, and passing the resulting string to the input function of the target data type. Default: false. |
assignment |
boolean |
— | Indicates that the cast can be invoked implicitly in assignment contexts. Default: false. |
implicit |
boolean |
— | Indicates that the cast can be invoked implicitly in any context. Default: false. |
comment |
string |
— | An optional comment about the table. |
dependencies |
dependencies | — | Database objects this object is dependent upon. |
Mutually exclusive forms¶
Exactly one of these must hold:
sql, withoutfunctionorinoutorassignmentorimplicit
No other properties are accepted.
Source: schemata/cast.yml · Resolved JSON Schema: cast.json