PostgreSQL Tcl Interface Documentation
Prev | Fast Backward |  | Fast Forward | Next

# pg_null_value_string

## Name

pg_null_value_string -- define a value to be returned for NULL fields distinct from the default value of an empty string.

## Synopsis

    pg_null_value_string ?string?

## Description

`pg_null_value_string` sets or retrieves a string to be returned in query results for fields whose value is NULL, making it possible to distinguish between NULL values an values that are not null but are comprised of an empty string. Without setting an alternative null value with this or with pg_result's -null_value_string, it is impossible to tell the difference between a NULL field value and one that is not null but empty.

## Arguments

string

  The string to be set that will be returned for null fields.

## Return Value

Returns the string that is currently being returned for null fields. It will be the passed string value if one was passed, or, otherwise, the value currently being used.

Prev | Home | Next
pg_cancelrequest | Up | pg_quote