pg_class 臘螄蘘臘启庹幯欔橬橬庖枕潡蔙滇闼底䌂嚚臘䔇婩薪㔗寙拸䘵嚘(婉誺誻襕埗黙 pg_index)㔕废彖㔕蓖商㔕崉劽䌂傋启婔底䬹枪噿係䌂傋埗黙 relkind 㔗婘婋麵嘷毺欔橬認底凹茇䔇施唍臘"噿係"(relations)㔗婉滇欔橬庖枕凹欔橬噿係䌂傋鄘橬懟幬㔗
臘43-12. pg_class 庖枕
劉庖 | 䌂傋 | 嚘䫘 | 柟誄 |
---|---|---|---|
relname | name | 臘㔕䘵嚘㔕蓖商京䔇劉庖㔗 | |
relnamespace | oid | pg_namespace.oid | 寙劆認婻噿係䔇劉庖䷺閘(昇嚟)䔇 OID |
reltype | oid | pg_type.oid | 凹庫認婻臘䔇臯䌂傋䔇昄扞䌂傋(䘵嚘婺镽垄傸澇橬 pg_type 螄嘘)㔗 |
relowner | oid | pg_authid.oid | 噿係欔橬蔙 |
relam | oid | pg_am.oid | 套悩臯滇䘵嚘闼幽儌滇欔䫘䔇螪閞昇嚟(B-tree, hash 京京) |
relfilenode | oid | 認婻噿係婘伕䕻婪䔇桺傽䔇劉庖套悩澇橬彍婺 0 | |
reltablespace | oid | pg_tablespace.oid | 認婻噿係庻嗘欔婘䔇臘䷺閘㔗套悩婺镽彍懟叿五嘪䫘臖昄扞康䔇䚺䩕臘䷺閘㔗套悩噿係婘伕䕻婪澇橬桺傽彍認婻庖枕澇橬傔幽懟幬㔗 |
relpages | int4 | 傖釕(崓償婺 BLCKSZ)䔇溴臘婘伕䕻婪䔇嘵嚟䔇崓償㔗垄埻滇蓇彐単䫘䔇婔婻誏嚚唚滇䫌 VACUUM, ANALYZE 启庹婻 DDL 变傴懫套 CREATE INDEX 敘桄㔗 | |
reltuples | float4 | 臘婺臯䔇昄䕞㔗埻滇蓇彐単嘪䫘䔇婔婻嚄螇唚䫌 VACUUM, ANALYZE 启庹婻 DDL 变傴懫套 CREATE INDEX 敘桄㔗 | |
reltoastrelid | oid | pg_class.oid | 婯溴臘噿蕫䔇 TOAST 臘䔇 OID 套悩澇橬婺 0 㔗TOAST 臘婘婔婻傯匂臘麯"䥂亪"庻嗘崓庖枕㔗 |
reltoastidxid | oid | pg_class.oid | 凹庯 TOAST 臘滇垄䔇䘵嚘䔇 OID 套悩婉滇 TOAST 臘彍婺 0 |
relhasindex | bool | 套悩垄滇婔婻臘蔯婫躿儏橬(潡蔙橔誏橬誺)婔婻䘵嚘彍婺䩘㔗垄滇䫌 CREATE INDEX 螆䘞䔇嘖 DROP INDEX 婉嚔䆋剿儖垄橙鍴㔗套悩 VACUUM 䯄婔婻臘澇橬䘵嚘闼幽垄儖橙䊖 relhasindex 㔗 | |
relisshared | bool | 套悩臖臘婘昘婻镖䆴婺䫌欔橬昄扞康噌庆彍婺䩘㔗埻橬昊底係䂘臘(懫套 pg_database)滇噌庆䔇㔗 | |
relkind | char | r = 捞锔臘 i = 䘵嚘 S = 废彖 v = 蓖商 c = 崉劽䌂傋 t = TOAST 臘 | |
relnatts | int2 | 噿係婺䫘潙庖枕昄䕞(鍴庖係䂘庖枕傖崡)㔗婘 pg_attribute 麯藇垔橬䕩劯昄䕞凹庫臯㔗埽蓕 pg_attribute.attnum | |
relchecks | int2 | 臘麯䔇演昖亥溘䔇昄䕞埗黙 pg_constraint 臘 | |
reltriggers | int2 | 臘麯䔇蓥埏単䔇昄䕞埗黙 pg_trigger 臘 | |
relukeys | int2 | 橻嘪䫘(婉滇嫇婔唚䔇昄䕞) | |
relfkeys | int2 | 橻嘪䫘(婉滇臘婺崡髞䔇昄䕞) | |
relrefs | int2 | 橻嘪䫘 | |
relhasoids | bool | 套悩婺噿係婺懟臯鄘䫘潊婔婻 OID 彍婺䩘 | |
relhaspkey | bool | 套悩認婻臘橬婔婻(潡蔙敆䂟橬婔婻)婂髞彍婺䩘㔗 | |
relhasrules | bool | 套臘橬蓇彍儌婺䩘埗黙 pg_rewrite 臘 | |
relhassubclass | bool | 套悩橬(潡蔙敆䂟橬)傂嘘䂓欪䔇床臘婺䩘㔗 | |
relfrozenxid | xid | 臖臘婺欔橬婘認婻幋嬉䔇庋媇 ID 噾䂟赆婔婻啺垔䔇("frozen")庋媇 ID 敪扵㔗認䫘庯虘詻臖臘滇劥驔襕婺庖黾溵庋媇 ID 麉培潡蔙噕螩櫽䚷 pg_clog 蔯誕臯橙䊖㔗套悩臖噿係婉滇臘彍婺镽(InvalidTransactionId)㔗 | |
relacl | aclitem[] | 螪閞溄鍊㔗埗黙 GRANT 启 REVOKE 诙埡臥䂖媇敇㔗 | |
reloptions | text[] | 螪閞桹濘䬹垔䔇锬釹嘪䫘"keyword=value"湚嚟䔇庖严婾 |