I am not able to understand concept and usage of schema in PostgreSQL. I have no idea how it can affect my database design.
Why should I use it?
Can it affect me in future if I decide to not think about them right now and worry about them later?
Explanation with an example will be nice.
Best Answer
Schemas in postgres are used mostly for namespacing and sometimes for security.
Namespacing because two objects can have the same name in different schemas, and are then referenced by
schema.object
notation - especially useful in conjunction withsearch_path
(many contrib modules do this, eg xml2). Security because you can now dogrant ... on all tables in schema
.