Skip to content

Project

project.yaml at the root of a project: the database-wide settings, and the objects that belong to the database rather than to a schema.

Properties

Property Type Required Description
name string yes The name of the database that is saved in the build artifact when generating a dump.
encoding string — Obsolete. The text of a project is UTF-8, and build always writes the archive in UTF8; pg_restore converts the text to the encoding of the database. A project loads only if the value names UTF8 (for example UTF8, UTF-8 or Unicode). Remove the field.
stdstrings boolean — Obsolete. The SQL of a project is written with standard_conforming_strings on, and build always writes the archive so. A project loads only if the value is true. Remove the field.
comment string — An optional comment about the database (COMMENT ON DATABASE).
security_labels security_labels — Security Labels.
connection_limit integer — The number of concurrent connections that the database allows (ALTER DATABASE ... CONNECTION LIMIT). -1, the default, means no limit. Absent is the same as -1. Minimum: -1. Maximum: 2147483647.
is_template boolean — true makes the database a template (ALTER DATABASE ... IS_TEMPLATE): a user with CREATEDB can clone it. Absent is the same as false, the default.
superuser string — The PostgreSQL super user. Default: "postgres".
extensions array of object — An array of PostgreSQL extensions to load into the database.
foreign_data_wrappers array of foreign_data_wrapper — An array of Foreign Data Wrappers to create in the database.
access_methods array of access_method — An array of table and index access methods to create.
languages array of object — An array of Procedural Languages to load into the database.
settings array of object — Configuration parameters to be set to the specified value when a session connects to the database (ALTER DATABASE ... SET), one object for each parameter. A value is a string, a number or a boolean. A setting that PostgreSQL keeps as a list of names, such as search_path, is a list of strings, one name for each item. For such a setting, one string with a comma is an error, because PostgreSQL reads it as one name. A list has at least one item.
role_settings object — Configuration parameters to be set when a role connects to the database (ALTER ROLE ... IN DATABASE ... SET), keyed by role name. Each value has the form of settings. The role does not have to be in the project.

extensions[]

Property Type Required Description
name string yes The name of the extension to be installed. PostgreSQL will create the extension using details from the file SHAREDIR/extension/extension_name.control.
schema string — The name of the schema in which to install the extension's objects, given that the extension allows its contents to be relocated.
version string — The version of the extension to install. This can be written as either an identifier or a string literal. The default version is whatever is specified in the extension's control file.
cascade boolean — Automatically install any extensions that this extension depends on that are not already installed. Default: false.
comment string — An optional comment about the extension.

languages[]

Property Type Required Description
name string yes The name of the language to load.
comment string — An optional comment about the language.
security_labels security_labels — Security Labels.
trusted boolean — Specifies if the language grants access to data that the user would not otherwise have access to. Default: false.
replace boolean — Use CREATE or REPLACE syntax. Default: false.
handler string — Specifies the name of a previously registered function that will be called to execute the procedural language's functions.
inline_handler string — Specifies the name of a previously registered function that will be called to execute an anonymous code block (DO command) in this language.
validator string — Specifies the name of a previously registered function that will be called when a new function in the language is created, to validate the new function.

No other properties are accepted.


Source: schemata/project.yml · Resolved JSON Schema: project.json