For the complete documentation index, see llms.txt. This page is also available as Markdown.

TYPE

TYPE

TYPE — 定義新的資料型別

語法


TYPE type_name IS ctype

說明

TYPE 命令定義新的 C 型別。它等同於在宣告區段中放入 typedef。

只有以 -c 選項執行 ecpg 時,才會識別此命令。

參數

type_name

新型別的名稱,必須是有效的 C 型別名稱。

ctype

C 型別規格。

範例

以下是使用 EXEC SQL TYPE 的範例程式:

此程式的輸出如下:

相容性

TYPE 命令是 PostgreSQL 擴充功能。


原文:PostgreSQL 15.19 Documentation

Last updated

Was this helpful?