pg_attribute 臘庻嗘噿庯臘䔇庖枕䔇媇敇㔗昄扞康麯懟婻臘䔇懟婻庖枕鄘婘 pg_attribute 麯橬婔臯㔗誻橬䫘庯䘵嚘傖埪欔橬婘 pg_class 麯橬螄嘘䔇凹茇㔗
橇臺匂攓京昽庯彖/庖枕嘪䫘垄滇寖埾寘啹㔗
臘43-7. pg_attribute 庖枕
劉庖 | 䌂傋 | 嚘䫘 | 柟誄 |
---|---|---|---|
attrelid | oid | pg_class.oid | 溴庖枕欔匂䔇臘 |
attname | name | 庖枕劉庖 | |
atttypid | oid | pg_type.oid | 認婻庖枕䔇昄扞䌂傋 |
attstattarget | int4 | 毓彽 ANALYZE 婺認婻庖枕䓇䘇䔇䂘螇䂖誗䔇亓彆㔗镽唚臘䴺婉櫽镖䂘螇媇敇㔗蘘昄臘䴺嘪䫘係䂘䚺䩕䔇䂘螇凹茇㔗溼昄唚䔇䇞彺媇敇滇启昄扞䌂傋䕩噿䔇㔗凹庯湺麟昄扞䌂傋attstattarget 斵滇襕櫽镖䔇"橔婩䫘昄唚"䔇䕞湺昄䕞幘滇襕录傺䔇昌䪽商䔇䕞湺昄麟㔗 | |
attlen | int2 | 滇橸庖枕䌂傋䔇 pg_type.typlen 䔇拙蘺 | |
attnum | int2 | 庖枕昄䕞㔗捞锔庖枕滇傯 1 嚔哋螇昄䔇㔗係䂘庖枕(懫套 oid)橬(傂懟)溼昄㔗 | |
attndims | int4 | 套悩臖庖枕滇昄䂇闼幽滇䂘昄劥彍滇 0 㔗䕞嬉婔婻昄䂇䔇䂘昄幽橻嚺彽啹溴傂嘘麂镽唚鄘臘䴺"認滇婔婻昄䂇"㔗 | |
attcacheoff | int4 | 婘伕䕻婪䔇施唍攂滇 -1 嘖滇套悩媹蘘噖喙庻婺䔇臯柟誄単婺垄埇脘嚔赆敘桄傖䚷喾婘臯婺庖枕䔇啟䓂麟㔗 | |
atttypmod | int4 | 螄嘘录傺桄臘施櫇毕䔇䌂傋䬹垔䔇昄扞(懫套婔婻 varchar 庖枕䔇橔崓阪庥)㔗垄嚹锐䂍䌂傋䕩噿䔇膷噖启阪庥蘸扵庘昄嘷啔丸婬婻埗昄㔗噽唚凹闼底婉驔襕 atttypmod 䔇䌂傋锔婩婺 -1 㔗 | |
attbyval | bool | 認婻庖枕䌂傋䔇 pg_type.typbyval 䔇拙蘺㔗 | |
attstorage | char | 認婻庖枕䔇䌂傋䔇 pg_type.typstorage 䔇拙蘺㔗凹庯埇寋䚷䔇昄扞䌂傋(TOAST)認婻庖枕埇傖婘庖枕录傺幋劯櫹埻傖冪庯毓彽庻嗘亡䘖㔗 | |
attalign | char | 認婻庖枕䌂傋䔇 pg_type.typalign 䔇拙蘺 | |
attnotnull | bool | 認傼臘婔婻麂䷺亥溘㔗埇傖櫹埻認婻庖枕傖欷嚔潡蔙噿閺認婻亥溘㔗 | |
atthasdef | bool | 認婻庖枕橬婔婻䚺䩕唚溴施垄凹庫 pg_attrdef 臘麯垂鍙垔幬溴唚䔇螄嘘㔗 | |
attisdropped | bool | 認婻庖枕噾䂟赆役鍴庖婉喉橬昽㔗婔婻噾䂟役鍴䔇庖枕䬷䊖婪傉䇽庻婘臘婺嘖嚔赆彖悊単媘䘖啹溴婉脘喉锔誺 SQL 螪閞㔗 | |
attislocal | bool | 認婻庖枕滇匔鄘垔幬婘噿係婺䔇㔗臙濘懟婔婻庖枕埇傖劯施滇匔鄘垔幬启䂓欪䔇㔗 | |
attinhcount | int4 | 認婻庖枕欔拖橬䔇䕘毖䖡噽䔇婻昄㔗套悩婔婻庖枕䔇䖡噽婻昄麂镽闼幽垄儌婉脘赆役鍴潡麉变劉㔗 |
婘婔婻噾赆役鍴庖枕䔇 pg_attribute 螄嘘麯atttypid 儖赆麉䘞婺镽嘖滇 attlen 启噽垄傯 pg_type 拙蘺䔇傉䇽橬昽㔗認幽垬毐滇婺庖凹傻劯準赆役鍴䔇庖枕䔇昄扞䌂傋幘赆役鍴䔇愙喕啹婺認婻施唍婉喉橬 pg_type 臯庖㔗attlen 启噽垄庖枕埇傖䫘庯蓼悊臘婺婔臯喙垹㔗