forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
107 lines
9.6 KiB
HTML
107 lines
9.6 KiB
HTML
<a name="EN-US_TOPIC_0000001233883297"></a><a name="EN-US_TOPIC_0000001233883297"></a>
|
|
|
|
<h1 class="topictitle1">User-defined External Function Usage (pgSQL/Java)</h1>
|
|
<div id="body0000001229396179"><ul id="EN-US_TOPIC_0000001233883297__ul18305191117205"><li id="EN-US_TOPIC_0000001233883297__li83061611182011">[Notice] Java UDFs can perform some Java logic calculation. Do not encapsulate services in Java UDFs.</li><li id="EN-US_TOPIC_0000001233883297__li4306411192015">[Notice] Do not connect to a database in any way (for example, by using JDBC) in Java functions.</li><li id="EN-US_TOPIC_0000001233883297__li93061811192013">[Notice] Only the data types listed in the following table can be used. User-defined types and complex data types (Java Array and derived classes) are not supported.</li><li id="EN-US_TOPIC_0000001233883297__li93061911182016">[Notice] User-defined aggregation functions (UDAFs) and user-defined table-generating functions (UDTFs) are not supported.</li></ul>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233883297__table7470152762417" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PL/Java mapping for default data types</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row52006273347"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.3.1.1"><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p12221055173619"><span id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_text1858749099">GaussDB(DWS)</span></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.3.1.2"><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p182285553613"><strong id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_b222555123617">Java</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row16200102783419"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1322105512361">BOOLEAN</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1922175514367">boolean</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row132001827103418"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1623155517366">"char"</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p22365583612">byte</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row192001627153420"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1124175533612">bytea</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p324165512366">byte[]</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row52011027113413"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1824155533619">SMALLINT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1424955103619">short</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row520182783411"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p32475516360">INTEGER</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p72485573617">int</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row2126124903615"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p112415517366">BIGINT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p12410551363">long</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row113734619364"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1224175519367">FLOAT4</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1324155513366">float</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row1220119277343"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p4245552369">FLOAT8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p132415556365">double</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row194001343143617"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p524055113617">CHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p024195516368">java.lang.String</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row989924003617"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1724155512367">VARCHAR</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p192418558360">java.lang.String</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row120172753416"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p92475512360">TEXT</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p132411553366">java.lang.String</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row1154313281354"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p42455515364">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p92645513367">java.lang.String</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row627313814365"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p426125515368">DATE</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p626175533613">java.sql.Timestamp</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row9126123918355"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p142695523610">TIME</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p2261855153620">java.sql.Time (stored value treated as local time)</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row47181243113513"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p1826055193619">TIMETZ</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p726165553613">java.sql.Time</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row16150193563516"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p52755593616">TIMESTAMP</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p02745533610">java.sql.Timestamp</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_row1445023473613"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p9278556361">TIMESTAMPTZ</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001233883297__en-us_topic_0000001188482166_p927135543614">java.sql.Timestamp</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0074.html">Development and Design Proposal</a></div>
|
|
</div>
|
|
</div>
|
|
|