Organize tables with schemas
A schema groups database objects. It is useful for organizing an application, but a schema name alone is not an authorization boundary.
Create a schema and table
Section titled “Create a schema and table”CREATE SCHEMA docs_app;CREATE TABLE docs_app.tasks (id BIGINT PRIMARY KEY, title TEXT);INSERT INTO docs_app.tasks VALUES (1, 'Review');SELECT id, title FROM docs_app.tasks;Resolve names explicitly
Section titled “Resolve names explicitly”Schema-qualified names such as docs_app.tasks are useful in shared tooling. If you use search_path, set and verify it on each connection instead of relying on a previous pool user’s session.
Database names
Section titled “Database names”The server exposes the particledb database, with postgres accepted as a compatibility name. Do not build database-per-customer automation without checking the installed release’s database-creation support.
Permissions
Section titled “Permissions”Use security and application isolation to choose access controls. Test as the application’s role, not an administrator.