gotchasqlMinor
Why does pgAdmin3 set OIDS=FALSE and owner to postgres by default?
Viewed 0 times
ownerwhyoidspgadmin3postgresfalsedefaultdoesandset
Problem
Why does pgAdmin3 automatically set the table owner to
postgres when its created and set OIDS=FALSE? I am new to PostgreSQL and want to know the rational behind this default behavior.-- Table: staging.mytable
-- DROP TABLE staging.mytable;
...
WITH (
OIDS=FALSE
);
ALTER TABLE staging.mytable
OWNER TO postgres;Solution
1 Why oids=false?
OIDS=FALSE/TURE, the default setting depends upon the default_with_oids configuration parameter,The parameter is off by default。in PostgreSQL 8.0 and earlier, it was on by default.
2 Why ownered by postgres?
Please check the role you use log in when using pgAdmin3 , if you log in as postgres role ,then the owner of new created table will be the postgres role.
OIDS=FALSE/TURE, the default setting depends upon the default_with_oids configuration parameter,The parameter is off by default。in PostgreSQL 8.0 and earlier, it was on by default.
2 Why ownered by postgres?
Please check the role you use log in when using pgAdmin3 , if you log in as postgres role ,then the owner of new created table will be the postgres role.
Context
StackExchange Database Administrators Q#39973, answer score: 5
Revisions (0)
No revisions yet.