Pathnames with Commas
"offset, length, pathname"
FILETOBLOB("0,-1,/tmp/blob,x","server");
The first term in the quoted pathname string is an offset of 0
, which instructs the database server to begin reading at the start of the file.
The second term is a length of -1
, which instructs the database server to continue reading until the end of the entire file.
The third term is the /tmp/blob,x pathname, specifying which file to read. (Notice the comma symbol that precedes the x.)
Because the pathname includes a comma, the comma-separated offset and length specifications are necessary in this example to avoid an error when FILETOBLOB is called. You do not need to specify offset and length for pathnames that include no comma, but including 0,-1, as the initial characters of the pathname string avoids this error for any valid pathname.