Overview
The pg_get_expr() is a system catalog information function that retrieves the internal form of an individual expression, such as the default value for a column.Syntax
There are two available syntax versions of thepg_get_expr() function:
pg_get_expr() function return an empty string "".
Parameters
The following parameters are required to execute this function:expr_text: expression for which you want to obtain the internal representation (can be any string value)relation_oid: OID (Object Identifier) of the table the expression belongs to (integer type)pretty_bool: boolean value determining whether to format the expression in a more human-readable format (TRUE) or not (FALSE)
Example
For the needs of this section, first we will create a sample table named employeessalary column using pg_get_expr() function