为什么 pgAdmin3 默认将 OIDS=FALSE 和 owner 设置为 postgres?

Nyx*_*nyx 3 postgresql pgadmin

为什么 pgAdmin3postgres在创建和设置表时自动设置表所有者OIDS=FALSE?我是 PostgreSQL 的新手,想知道这种默认行为背后的原因。

-- Table: staging.mytable

-- DROP TABLE staging.mytable;

...

WITH (
  OIDS=FALSE
);

ALTER TABLE staging.mytable
OWNER TO postgres;
Run Code Online (Sandbox Code Playgroud)

fra*_*ncs 5

1 为什么 oids=false?

OIDS=FALSE/TURE,默认设置取决于default_with_oids配置参数?该参数默认关闭?在PostgreSQL 8.0及更早版本中,默认开启。

2 为什么由postgres拥有?

请检查您在使用 pgAdmin3 时使用的登录角色?如果您以 postgres 角色登录,那么新创建的表的所有者将是 postgres 角色。