PG数据库下表字段更新对pg_attribute表空间影响:
1)TEST数据库下已有一张class表,信息如下,包含两个字段int类型的num和varchar(20)类型的name:
TEST=# \d class
资料表 "public.class"
栏位 | 型别 | 修饰词
------+-----------------------+--------
num | integer | 非空
name | character varying(20) |
2)查看此时存储在pg_attribute表中class表的字段信息,结果如下:
TEST=# select attrelid,attname from pg_attribute a, pg_class b where a.attrelid=b.oid and b.relname='class';
-[ RECORD 1 ]------
attrelid | 35012
attname | cmax
-[ RECORD