|The PostgreSQL 9.0 Reference Manual - Volume 2 - Programming Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 478 pages
RRP £14.95 ($19.95)
Sales of this book support the PostgreSQL project! Get a printed copy>>>
11.3.2 Utility functions in PL/Perl
Emit a log or error message. Possible levels are
ERRORraises an error condition; if this is not trapped by the surrounding Perl code, the error propagates out to the calling query, causing the current transaction or subtransaction to be aborted. This is effectively the same as the Perl
diecommand. The other levels only generate messages of different priority levels. Whether messages of a particular priority are reported to the client, written to the server log, or both is controlled by the
client_min_messagesconfiguration variables. See Volume 3: Server Configuration for more information.
Return the given string suitably quoted to be used as a string literal in an SQL
statement string. Embedded single-quotes and backslashes are properly doubled.
quote_literalreturns undef on undef input; if the argument might be undef,
quote_nullableis often more suitable.
- Return the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is undef, return the unquoted string "NULL". Embedded single-quotes and backslashes are properly doubled.
- Return the given string suitably quoted to be used as an identifier in an SQL statement string. Quotes are added only if necessary (i.e., if the string contains non-identifier characters or would be case-folded). Embedded quotes are properly doubled.
Return the unescaped binary data represented by the contents of the given string,
which should be
byteaencoded form of the binary data contents of the given string.
Returns the contents of the referenced array as a string in array literal format
(see Volume 1A: 6.14.2 Array Value Input).
Returns the argument value unaltered if it's not a reference to an array.
The delimiter used between elements of the array literal defaults to "
," if a delimiter is not specified or is undef.
Returns the contents of the referenced array as a string in array constructor format
(see Volume 1A: 2.2.11 Array Constructors).
Individual values are quoted using
quote_nullable. Returns the argument value, quoted using
quote_nullable, if it's not a reference to an array.
Returns a true value if the content of the given string looks like a
number, according to Perl, returns false otherwise.
Returns undef if the argument is undef. Leading and trailing space is
Infinityare regarded as numbers.
|ISBN 9781906966065||The PostgreSQL 9.0 Reference Manual - Volume 2 - Programming Guide||See the print edition|