このページを編集する際は、[[編集に関する方針]]に従ってください。 *概要 [#yfd2da45] -対象:8.1.4 -言語:C -[[postgresql-8.1.4/src/include/access/tupdesc.h]]にて定義 -データ型TupleDescを、以下のメンバを持つ構造体として定義。 -nattsを、intとして定義。 -attrsを、以下のメンバを持つ構造体Form_pg_attributeへのポインタとして定義。 --attrelidを、Oid(unsigned intの別名)として定義。 --attnameを、以下のメンバを持つ構造体NameDataとして定義。 ---dataを、サイズNAMEDATALENのchar配列として定義。 ---alignmentDummyを、intとして定義。 --atttypidを、Oid(unsigned intの別名)として定義。 --attstattargetを、int4(int32(signed int)の別名)として定義。 --attlenを、int2(int16(signed short)の別名)として定義。 --attnumを、int2(int16(signed short)の別名)として定義。 --attndimsを、int4(int32(signed int)の別名)として定義。 --attcacheoffを、int4(int32(signed int)の別名)として定義。 --atttypmodを、int4(int32(signed int)の別名)として定義。 --attbyvalを、bool(charの別名)として定義。 --attstorageを、charとして定義。 --attalignを、charとして定義。 --attnotnullを、bool(charの別名)として定義。 --atthasdefを、bool(charの別名)として定義。 --attisdroppedを、bool(charの別名)として定義。 --attislocalを、bool(charの別名)として定義。 --attinhcountを、int4(int32(signed int)の別名)として定義。 -constrを、TupleConstrへのポインタとして定義。 --defvalを、以下のメンバを持つ構造体AttrDefaultへのポインタとして定義。 ---adnumを、AttrNumber(int16(signed shortの別名)の別名))として定義。 ---adbinを、charへのポインタとして定義。 --checkを、以下のメンバを持つ構造体ConstrCheckへのポインタとして定義。 ---ccnameを、charへのポインタとして定義。 ---ccbinを、charへのポインタとして定義。 --num_defvalを、uint16(unsigned shortの別名)として定義。 --num_checkを、uint16(unsigned shortの別名)として定義。 --has_not_nullを、bool(charの別名)として定義。 -tdtypeidを、Oid(unsigned intの別名)として定義。 -tdtypmodを、int32(signed intの別名)として定義。 -tdhasoidを、bool(charの別名)として定義。 *実装 [#n971767f] typedef struct tupleDesc { int natts; /* number of attributes in the tuple */ Form_pg_attribute *attrs; /* attrs[N] is a pointer to the description of Attribute Number N+1 */ -以下のメンバを持つ構造体FormData_pg_attributeへのポインタ。詳細は[[Form_pg_attribute/postgresql-8.1.4]]参照。 --attrelidを、Oid(unsigned intの別名)として定義。 --attnameを、以下のメンバを持つ構造体NameDataとして定義。 ---dataを、サイズNAMEDATALENのchar配列として定義。 ---alignmentDummyを、intとして定義。 --atttypidを、Oid(unsigned intの別名)として定義。 --attstattargetを、int4(int32(signed int)の別名)として定義。 --attlenを、int2(int16(signed short)の別名)として定義。 --attnumを、int2(int16(signed short)の別名)として定義。 --attndimsを、int4(int32(signed int)の別名)として定義。 --attcacheoffを、int4(int32(signed int)の別名)として定義。 --atttypmodを、int4(int32(signed int)の別名)として定義。 --attbyvalを、bool(charの別名)として定義。 --attstorageを、charとして定義。 --attalignを、charとして定義。 --attnotnullを、bool(charの別名)として定義。 --atthasdefを、bool(charの別名)として定義。 --attisdroppedを、bool(charの別名)として定義。 --attislocalを、bool(charの別名)として定義。 --attinhcountを、int4(int32(signed int)の別名)として定義。 TupleConstr *constr; /* constraints, or NULL if none */ -以下のメンバを持つ構造体。詳細は[[TupleConstr/postgresql-8.1.4]]参照。 --defvalを、以下のメンバを持つ構造体AttrDefaultへのポインタとして定義。 ---adnumを、AttrNumber(int16(signed shortの別名)の別名))として定義。 ---adbinを、charへのポインタとして定義。 --checkを、以下のメンバを持つ構造体ConstrCheckへのポインタとして定義。 ---ccnameを、charへのポインタとして定義。 ---ccbinを、charへのポインタとして定義。 --num_defvalを、uint16(unsigned shortの別名)として定義。 --num_checkを、uint16(unsigned shortの別名)として定義。 --has_not_nullを、bool(charの別名)として定義。 Oid tdtypeid; /* composite type ID for tuple type */ -unsigned intの別名。詳細は[[Oid/postgresql-8.1.4]]参照。 int32 tdtypmod; /* typmod for tuple type */ -signed intの別名。詳細は[[int32/postgresql-8.1.4]]参照。 bool tdhasoid; /* tuple has oid attribute in its header */ -charの別名。詳細は[[bool/postgresql-8.1.4]]参照。 } *TupleDesc; *呼出元 [#o2156e7a] -[[heap_compute_data_size()/postgresql-8.1.4]] *備考 [#s7ae4dd9] *履歴 [#b5aa1bd1] -作者:[[testnoda/ページ作者]] -日付:2006/9/3 |更新日|更新者|更新内容| ||||