rows icon indicating copy to clipboard operation
rows copied to clipboard

Schema (namespace) support

Open juliano777 opened this issue 7 years ago • 2 comments

https://www.postgresql.org/docs/current/static/ddl-schemas.html

juliano777 avatar Oct 11 '17 18:10 juliano777

@juliano777, could you please add more details on this proposed feature?

turicas avatar Oct 11 '17 18:10 turicas

SCHEMA is a database object hierarchically just below a database. For example:

Server -> Instance -> Database -> Schema -> {table, index, view, etc}.

In PostgreSQL "public" is the default schema.

CREATE TABLE tb_foo ( field int);

Is equivalent to:

CREATE TABLE public.tb_foo ( field int);

Schemas are organizational structures also known as namespaces. Allows you to create one or more objects with the same name, for example:

CREATE SCHEMA finance; CREATE SCHEMA comercial;

CREATE TABLE finance.tb_foo( . . . );

CREATE TABLE comercial.tb_foo( . . . );

finance.tb_foo and comercial tb_foo have the same name, but different namespaces.

juliano777 avatar Oct 16 '17 10:10 juliano777