Skip to main content
Experimental feature Advice on use of experimental features Constructs a temporary FILE using the same fields, types, and validation rules as to_file. Only rows with invalid field values become NULL; other rows are unaffected.

Syntax

Parameters

struct_expr: the same as in to_file.

Return value

Returns a FILE value. If conversion to FILE fails, returns NULL.

Usage notes

  • Unknown or duplicate fields, unsupported types, and invalid argument counts still cause analysis errors. Errors evaluating the argument and internal or resource errors are not converted to NULL.

Examples

Example 1: Valid input

Example 2: Invalid rows return NULL

keyword

TRY_TO_FILE, FILE