.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>shsql: create stream</title>
<body bgcolor=99cc99 vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td align=right><a href="shsql_home.html">
<img src="img/shsql.gif" border=0><br><small>SQL database system</a> &nbsp; </td></tr>
<td>
.>>

.TH CREATE STREAM TDH "02-JUN-2005   TDH scg@jax.org" 

.SH CREATE STREAM
.LP
\fCCREATE STREAM\fR is a \fBshsql\fR SQL command extension that allows a 
shell command to appear to \fBshsql\fR as a temporary table.
Whenever the temporary table is referenced in a \fCSELECT\fR statement, the
shell command is executed.  
.LP
Usage: \fCCREATE  STREAM  \fItemptablename\fC  AS  \fIshellcommand\fR
.LP
\fItemptable\fR names the 
.ig >>
<a href="temptables.html">
.>>
\0temporary table
.ig >>
</a>
.>>
that will be created.  
.LP
\fIshellcommand\fR is the shell command to be executed.  It will be executed
with the project data directory as its current working directory, at the time
it is accessed in a \fCSELECT\fR command.
The \fIshellcommand\fR must produce a data stream on its standard output that 
has a fieldname header and fields/records delimited appropriately.
.LP
Security concern: Avoid building \fIshellcommand\fR with user-supplied values.
If this must be done, care must be taken to process the user-supplied values
first to remove shell meta characters, quote 
characters, semi-colons, etc.
Otherwise malicious users may be able to execute arbitrary commands.
.LP
\fBExample:\fR
\fC CREATE STREAM $tmp1 AS compstats 65 gbvol M\fR


.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="shsql_home.html">
<img src="img/shsql.gif" border=0></a><br>
<a href="Copyright.html">Copyright Steve Grubb</a> &nbsp;
</td></tr>
</table>
.>>
