www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
ascii
blob_to_string
blob_to_string_outpu...
chr
ends_with
initcap
isblob
isstring
lcase
left
length
locate
ltrim
make_string
regexp_instr
regexp_like
regexp_match
regexp_parse
regexp_replace
regexp_substr
repeat
replace
right
rtrim
search_excerpt
serialize
space
split_and_decode
sprintf
sprintf_inverse
sprintf_iri
sprintf_iri_or_null
sprintf_or_null
starts_with
strcasestr
strchr
strcontains
string_output
string_output_flush
string_output_gz_com...
string_output_string
string_to_file
strrchr
strstr
subseq
substring
tmp_file_name
trim
ucase
upper
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

tmp_file_name

returns the unique file name within temporary directory of the operating system
varchar tmp_file_name (in prefix varchar, in suffix varchar);
Description

The following function is used to obtain unique name of a file, which is located in temporary directory on file system. The two optional parameters can be supplied: prefix of the file and extension for it. These will be prepended and appended (dot MUST be omitted) to the unique string. The directory where this file is located depends of $TMPDIR or %TMP% environment settings for UNIX's and Windows platforms respectively. If these environment settings are not available or empty, the defaults will be used for the operation system. (in practice for most UNIX's it's /tmp or /var/tmp directory). Note that this function do NOT open the file, it only give us a name.

Parameters
prefix – prefix to the file name to be added. MUST be at most five characters.
suffix – extension to the file to be added, the leading dot MUST be omitted.
Errors

Parameter data type checking errors

Examples
Getting a unique file name
      
      SQL> select tmp_file_name('FOO', 'EXT');
      callret
      VARCHAR
      ________________________________________

      /tmp/FOOFoCnq5.EXT

      1 Rows. -- 7 msec.