UUENCODE v11
Use the UUENCODE
function to translate RAW
data into a uuencode formatted encoded string. The signature is:
This function returns a RAW
value.
Parameters
r
r
contains the RAW
string that will be translated to uuencode format.
type
type
is an INTEGER
value or constant that specifies the type of uuencoded string that will be returned; the default value is 1
. The possible values are:
Value | Constant |
---|---|
1 | complete |
2 | header_piece |
3 | middle_piece |
4 | end_piece |
filename
filename
is a VARCHAR2
value that specifies the file name that you want to embed in the encoded form; if you do not specify a file name, UUENCODE
will include a filename of uuencode.txt
in the encoded form.
permission
permission
is a VARCHAR2
that specifies the permission mode; the default value is NULL
.
Examples
Before executing the following example, invoke the command:
This command instructs the server to escape any non-printable characters, and to display BYTEA
or RAW
values onscreen in readable form. For more information, refer to the Postgres Core Documentation available at:
https://www.postgresql.org/docs/11/static/datatype-binary.html
The following example uses UUENCODE
and UUDECODE
to first encode and then decode a string: