<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # Chapter 44\. 服務器編程接口 **Table of Contents** + 44.1\. 接口函數 + [SPI_connect](#calibre_link-1718)?--?把一個過程與 SPI 管理器連接起來 + [SPI_finish](#calibre_link-561)?--?把一個過程與 SPI 管理器斷開 + [SPI_push](#calibre_link-560)?--? 對 SPI 堆棧進行壓棧操作以允許遞歸的 SPI 使用 + [SPI_pop](#calibre_link-563)?--?彈出 SPI 堆棧以從遞歸的 SPI 使用中返回 + [SPI_execute](#calibre_link-1719)?--?執行一條命令 + [SPI_exec](#calibre_link-640)?--?執行一個讀/寫命令 + [SPI_execute_with_args](#calibre_link-639)?--?執行一個帶有外聯參數的命令 + [SPI_prepare](#calibre_link-641)?--?準備一個規劃但不立即執行它 + [SPI_prepare_cursor](#calibre_link-673)?--?準備一個語句但不立即執行它 + [SPI_prepare_params](#calibre_link-674)?--?準備一個語句但不立即執行它 + [SPI_getargcount](#calibre_link-1720)?--?返回一個`SPI_prepare` 準備的已準備好語句需要的參數個數 + [SPI_getargtypeid](#calibre_link-766)?--?返回`SPI_prepare` 準備的已準備好語句的參數的數據類型OID + [SPI_is_cursor_plan](#calibre_link-765)?--?如果一個`SPI_prepare`準備的語句可以和 `SPI_cursor_open`一起使用,則返回`true` + [SPI_execute_plan](#calibre_link-767)?--?執行一個`SPI_prepare`準備的語句 + [SPI_execute_plan_with_paramlist](#calibre_link-899)?--?執行一個`SPI_prepare`準備的已準備好的語句 + [SPI_execp](#calibre_link-900)?--?以讀/寫模式執行一個準備的查詢規劃 + [SPI_cursor_open](#calibre_link-1721)?--?用`SPI_prepare`創建的語句設置一個游標 + [SPI_cursor_open_with_args](#calibre_link-1722)?--?使用查詢和參數設置一個游標 + [SPI_cursor_open_with_paramlist](#calibre_link-1723)?--?使用參數設置一個游標 + [SPI_cursor_find](#calibre_link-1147)?--?用名字尋找并執行一個現存的游標 + [SPI_cursor_fetch](#calibre_link-1146)?--?從一個游標里抓取一些行 + [SPI_cursor_move](#calibre_link-1148)?--?移動一個游標 + [SPI_scroll_cursor_fetch](#calibre_link-1724)?--?從一個游標中抓取一些行 + [SPI_scroll_cursor_move](#calibre_link-1725)?--?移動一個游標 + [SPI_cursor_close](#calibre_link-1726)?--?關閉一個游標 + [SPI_keepplan](#calibre_link-1727)?--?保存一個預備語句 + [SPI_saveplan](#calibre_link-1728)?--?保存一個預備語句 + 44.2\. 接口支持函數 + [SPI_fname](#calibre_link-1729)?--?從指定的字段編號判斷字段名字 + [SPI_fnumber](#calibre_link-1730)?--?判斷聲明字段名的字段編號 + [SPI_getvalue](#calibre_link-1731)?--?返回聲明字段的字符串值 + [SPI_getbinval](#calibre_link-1732)?--?返回聲明字段的二進制值 + [SPI_gettype](#calibre_link-1733)?--?返回聲明字段的數據類型名 + [SPI_gettypeid](#calibre_link-1734)?--?返回聲明字段的數據類型OID + [SPI_getrelname](#calibre_link-1735)?--?返回聲明關系的名字 + [SPI_getnspname](#calibre_link-1736)?--?返回聲明關系的名字空間 + 44.3\. 內存管理 + [SPI_palloc](#calibre_link-1737)?--?在上層執行器環境里分配內存 + [SPI_repalloc](#calibre_link-1738)?--?在上層執行器環境里重新分配內存 + [SPI_pfree](#calibre_link-1739)?--?在上層執行器環境里釋放內存 + [SPI_copytuple](#calibre_link-1740)?--?在上層執行者環境里制作一個行的拷貝 + [SPI_returntuple](#calibre_link-1741)?--?準備把一個行當作 Datum 返回 + [SPI_modifytuple](#calibre_link-1742)?--?通過替換一個給出行的選定的字段創建一行 + [SPI_freetuple](#calibre_link-1743)?--?釋放在上層執行者環境里分配的一行 + [SPI_freetuptable](#calibre_link-1744)?--?釋放一個由`SPI_execute`或者類似的函數創建的行集 + [SPI_freeplan](#calibre_link-1745)?--? 釋放一個前面保存的預備語句 + 44.4\. 數據改變的可視性 + 44.5\. 例子 _服務器編程接口_(SPI) 給在用戶定義的C函數里面運行SQL 查詢的能力。SQL是一套接口函數,用于簡化對分析器、 規劃器和執行器的訪問。SQL還進行一些內存管理的工作。 > **Note:** 過程語言的存在也提供了其它的一些在過程里執行 SQL 命令的方法。 這些語言中的大部分本身就是基于 SPI 的, 因此這份文檔可能會對那些語言的用戶同樣有幫助。 為了避免混淆,將使用術語"函數"(function)來代表 SPI接口函數,用"過程"(procedure) 代表用戶用SPI定義的 C 函數。 注意,如果一條通過 SPI 調用的命令失敗,那么控制不會返回到你的過程中。 取而代之的是,你的過程執行所在的事務或者子事務全部回滾。 這一點看起來可能很奇怪,因為大多數 SPI 函數的文檔里都有錯誤返回習慣。 不過,那些習慣只適用于在 SPI 函數自己內部檢測到的錯誤。 可以通過在你自己的可能失敗的 SPI 調用周圍建立一個子事務的方法來在錯誤之后恢復控制。 目前還沒有寫這方面的文檔,因為所需要的機制仍然在變化。 如果執行成功了,SPI函數返回一個非負結果 (或者通過返回一個整數值或放在全局變量`SPI_result`里, 像下面描述的那樣)。出錯時,返回一個負數或`NULL`結果。 使用 SPI 的源代碼文件必須包含頭文件`executor/spi.h`。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看