⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 postgresql.html

📁 通用的数据库中间库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
            <P>&nbsp;</P>
            
            <H3><A 
            name="Returning output parameters">Returning output 
            parameters</A>  </H3>
            <p><STRONG> PostgreSQL</STRONG> 
               server does not support stored procedures.</p>
            <P>&nbsp;</P>
            
            <H3><A name="Cancelling queries">Cancelling 
            queries</A> </H3>
            <P>Using <A href="../OnLineDoc/Command_Cancel.html" >SACommand::Cancel</A> method you 
            can cancel the following types of processing on a statement:</P>
            <UL type=disc>
                <LI>A function running asynchronously on 
                the statement.<BR>
                <LI>A function running on the statement on 
                another thread. </LI></UL>
            <p>SQLAPI++ calls <STRONG>PQrequestCancel</STRONG>  function to cancel a query. To get more 
            details see <STRONG>  <STRONG>PQrequestCancel</STRONG></STRONG> function 
            description in <STRONG>PostgreSQL</STRONG> 
            documentation.</p>
            <P>For more details see <A href="../OnLineDoc/Command_Cancel.html" >SACommand::Cancel</A>.</P>
            <P>&nbsp;</P>
            
            <H3><A 
            name="Connection and command options">Connection and command 
            options</A> 
            </H3>
                        <P>A server specific option can be related with 
            a command or with a connection. A connection related option must be 
            specified in a&nbsp;<A 
                        href="../OnLineDoc/Connection.html" >SAConnection</A>
                        object. A command 
            related option may be specified in either<A href="../OnLineDoc/Connection.html" >SAConnection</A>
            object or 
            <A href="../OnLineDoc/Command_Usage.html" > SACommand</A> 
            object. 
            </P>
            <P>       Specific 
            options for <STRONG>PostgreSQL</STRONG> server:</P>
            <TABLE border=1 cellPadding=5 width=100%>
                <TBODY>
                <TR bgColor=#000094>
                    <TD width=17%>
                        <P><STRONG><FONT color=white face="">Option name</FONT>&nbsp; 
                        </STRONG></P></TD>
                    <TD>
                        <P><STRONG><FONT color=white face=""> Description</FONT> 
                        </STRONG></P></TD></TR>
                <TR>
                    <TD><STRONG>
                        <P align=center>
                        <STRONG>OidTypeInterpretation</STRONG> 
                        </P></STRONG> 
                        </TD>
                    <TD>
                        <P>     
                              Forces SQLAPI++ Library to 
                        interpret fields of     
                              Oid type 
                        as an object identifier or a Large 
                        Object.<BR > <STRONG>Command 
                        related.</STRONG>
                <BR>
                    Valid values: 
                        &quot;LargeObject&quot; and &quot;Oid&quot;.
                    <BR>   
                           Default value: &quot;Oid&quot;.</P>
                        <P>     
                              After you set 
                        &quot;LargeObject&quot; value to this option, SQLAPI++ 
                        interprets Oid type fields data as   
                               BLob data. Otherwise, it 
                        reads   
                               them 
                        as object identifiers (as ordinary numbers).</P></TD></TR>
                <TR>
                    <TD><STRONG>
                        <P align=center>
                        <STRONG>UseDLLonWin32</STRONG> 
                        </P></STRONG> 
                        </TD>
                    <TD>
                        <P>     
                          Forces     
                          SQLAPI++ Library to use pq.dll 
                        or     
                          libpq.dll when you are working on Win32 platform.<BR > <STRONG>Connection 
                        related.</STRONG> Should be specified before the first 
                        connection is made.
	                <BR>
                    Valid values: 
                        &quot;CygWin&quot; and &quot;Native&quot;.
                    <BR>   
                           Default   
                           value: &quot;Native&quot;. SQLAPI++ 
                        uses libpq.dll as the   
                           default 
                        API DLL.<BR>   
                              
                                Setting   
                              
                                &quot;CygWin&quot; 
                        value of this option forces SQLAPI++   
                           to use pq.dll.</P></TD></TR>
                </TBODY>
			</TABLE><P>For more details see 
                        <A href="../OnLineDoc/Command_setOption.html" >SACommand::setOption</A>,
                        <A href="../OnLineDoc/Connection_setOption.html" >SAConnection::setOption 
                         </A>.</P><P>&nbsp;</P>
            
            
            <H3><A name="Getting native PostgreSQL API">Getting 
            native PostgreSQL API</A>   </H3>
            <P>You can call client specific API functions 
            which are not directly supported by SQLAPI++ Library. <A 
            href="../OnLineDoc/Connection_NativeAPI.html">SAConnection::NativeAPI</A> 
            method returns a pointer to the set of native API functions 
            available for <STRONG>PostgreSQL</STRONG>. 
            To use the database API directly you have to downcast 
            this <STRONG>saAPI</STRONG> pointer to the appropriate type and use its 
            implementation-specific members. The following table shows what type 
            cast you have to make and what additional header file you have to 
            include to work with <STRONG>PostgreSQL</STRONG>   
            API. </P>
            <P>
            <TABLE border=1 cellPadding=5 width=100%>
                <TR bgColor=#000094>
                    <TD style="WIDTH: 300px" width=300>
                        <P><STRONG><FONT color=white face="">Type casting</FONT> 
                        </STRONG></P></TD>
                    <TD>
                        <P><STRONG><FONT color=white face="">Additional 
                        <BR>include 
                        file</FONT> </STRONG></P></TD></TR>
                <TR>
                    <TD>
                        <P>Cast the result to <STRONG 
                        >class pgAPI</STRONG>:</P>
                        <P><FONT face=System>saAPI *pResult = con.NativeAPI();<BR>pgAPI *p_pgAPI = (pgAPI *)pResult;</FONT></P></TD>
                    <TD><STRONG>
                        <P><STRONG>#include 
                &lt;pgAPI.h&gt;</STRONG></P> </STRONG></TD></TR>
			</TABLE> </P>
            <P>To get more information about DBMS API 
            functions see this DBMS specific documentation.&nbsp; </P>
            <P>For more details see <A 
            href="../OnLineDoc/Connection_NativeAPI.html">SAConnection::NativeAPI</A>.</P>
            <P>&nbsp;</P>
            <H3><A 
            name="Getting native PostgreSQL connection related handles">Getting 
            native PostgreSQL connection related handles</A>     </H3>
            <P>You have to use native API handles when you 
            want to call specific <STRONG>PostgreSQL</STRONG>
                 API functions which are not directly 
            supported by the Library. API functions usually need to receive one 
            or more active handles as a parameter(s). <A 
            href="../OnLineDoc/Connection_NativeHandles.html">SAConnection::NativeHandles</A> method returns a pointer to 
            the set of native API <STRONG>connection 
            related</STRONG> handles. To use API handles directly you have to 
            downcast <STRONG>saConnectionHandles</STRONG> pointer to the appropriate type 
            and use its implementation-specific members. The following table 
            shows what type cast you have to make and what additional header 
            file you have to include to work with specific 
            <STRONG>PostgreSQL</STRONG>      
                    
                        
                      
            API. </P>
            <p>
            <table border=1 cellPadding=5 width=100%>
                <TBODY>
                <tr bgColor=#000094>
                    <td >
                        <P><STRONG><FONT color=white face="">Type casting</FONT> </STRONG></P></td>
				</tr>
                <TR>
                    <TD>
                        <P><STRONG><FONT color=maroon 
                        face="">Cast the result</FONT></STRONG>   to <STRONG 
                        >class 
                        pgConnectionHandles</STRONG>:</P><FONT face=System><FONT face=System>
                        <P><STRONG><FONT color=maroon face="">#include 
                        &lt;pgAPI.h&gt;</FONT> </STRONG></P>
                        <P>saConnectionHandles *pResult = 
                        con.NativeHandles</FONT>();<BR>pgConnectionHandles *p_pgCH 
                        =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        (pgConnectionHandles *)pResult;</p>
                        <P><FONT 
                        face="Times New Roman"><STRONG><FONT color=maroon 
                        face="">Available handles:</FONT></STRONG></FONT> 
                         </P>
                        <UL>
                            <LI><FONT face="Times New Roman">PGconn 
                            *conn;</FONT> </FONT></LI></UL></td></tr>
			</table></P>
            <P>To get more information about DBMS API 
            functions and handles see this DBMS specific documentation.&nbsp; 
            </P>
            <P>For more details see <A 
            href="../OnLineDoc/Connection_NativeHandles.html">SAConnection::NativeHandles</A>.</P>
            <P>&nbsp;</P>
            <H3><A 
            name="Getting native PostgreSQL command related handles">Getting native 
            PostgreSQL command related handles</A>     </H3>
            <P>You have to use native API handles when you 
            want to call specific <STRONG>PostgreSQL</STRONG>
                 API functions which are not directly 
            supported by the Library. API functions usually need to receive one 
            or more active handles as a parameter(s). <A 
            href="../OnLineDoc/Command_NativeHandles.html">SACommand::NativeHandles</A> method returns a pointer to the 
            set of native API <STRONG>command 
            related</STRONG> handles. To use API handles directly you have to 
            downcast <STRONG>saCommandHandles</STRONG> pointer to the appropriate type and 
            use its implementation-specific members. The following table shows 
            what type cast you have to make and what additional header file you 
            have to include to work with specific <STRONG>PostgreSQL</STRONG>       
            API. </P>
            <p>
            <table border=1 cellPadding=5 width=100%>
                <TBODY>
                <tr bgColor=#000094>
                    <td >
                        <P><STRONG><FONT color=white face="">Type casting</FONT> </STRONG></P></td>
				</tr>
                <TR>
                    <TD>
                        <P><STRONG><FONT color=maroon 
                        face="">Cast the result</FONT></STRONG>   to <STRONG 
                        >class 
                        pgCommandHandles</STRONG>:</P><FONT face=System><FONT face=System>
                        <P><STRONG><FONT color=maroon face="">#include 
                        &lt;pgAPI.h&gt;</FONT> </STRONG></P>
                        <P>saCommandHandles *pResult = 
                        cmd.NativeHandles</FONT>();<BR>pgCommandHandles *p_pgCH 
                        =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        (pgCommandHandles *)pResult;</p>
                        <P><FONT 
                        face="Times New Roman"><STRONG><FONT color=maroon 
                        face="">Available handles:</FONT></STRONG></FONT> 
                         </P>
                        <UL>
                            <LI><FONT face="Times New Roman"> PGresult 
                            *res;</FONT></LI></UL></FONT></TD></TR></TBODY></TABLE></P>
            <P>To get more information about DBMS API 
            functions and handles see this DBMS specific documentation.&nbsp; 
            </P>
            <P>For more details see <A 
            href="../OnLineDoc/Command_NativeHandles.html">SACommand::NativeHandles</A>.</P>
            <P>&nbsp;</P>
            
            <H3><A name="Error handling">Error 
            handling</A> </H3>
            <P>When an error occurs inside SQLAPI++ Library 
            it throws an exception of type <A href="../OnLineDoc/Exception.html" >SAException</A>. <A 
            href="../OnLineDoc/Exception_ErrPos.html">SAException::ErrPos</A> 
            method gets an error position in SQL statement. In 
            <STRONG>PostgreSQL</STRONG>
            server <A 
            href="../OnLineDoc/Exception_ErrPos.html">SAException::ErrPos</A> method 
            returns -1 because <STRONG>PostgreSQL</STRONG>  
            does not support this function.</P>
            <P>For more details see <A 
            href="../HowTo/errors.html">How To - Error handling</A>, <A 
            href="../OnLineDoc/Exception_Usage.html">SAException object</A>.</P>
            <P>&nbsp;</P>
            
            <H3><A 
            name="Special header files - Compile time">Special header files - 
            Compile time</A>     </H3>
            <P>The header files are in the <STRONG>include</STRONG> subdirectory of SQLAPI++ 
            distributions:<BR><STRONG>#include &lt;SQLAPI.h&gt; 
            </STRONG>- main header, should be 
            used whenever SQLAPI++ is used.<BR><STRONG> #include &lt;pgAPI.h&gt; 
            </STRONG>- 
            <STRONG>PostgreSQL</STRONG>  , should be included if direct libpq calls are 
            required.</P>
            <P>For more details see <A 
            href="../OnLineDoc/index.html#Instructions for Compiling and Linking Applications with SQLAPI++">Online Documentation - Instructions for 
            Compiling and Linking Applications with SQLAPI++</A>&nbsp;</P>
            <P>&nbsp;</P>
            
            <h3>Problems and Questions</h3>
            <p>If you don't find the answer to you 
            questions or have some problems on using the Library, please, send 
            e-mail to <A href="mailto:howto@sqlapi.com">howto@sqlapi.com</A>. </p></TD>
	<tr></tr></TBODY></TABLE></FONT>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -