> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pgxman.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pack

A pgxman pack is a YAML configuration file used to declare a collection of PostgreSQL extensions for installation via pgxman.
It serves as an input file for the command `pgxman pack install -f /PATH_TO/pgxman.yaml`, defining the required extensions, their versions, and the targeting PostgreSQL versions.

## Example

```yaml theme={null}
apiVersion: v1
extensions:
  - name: "pgvector"
    version: "0.5.0"
  - name: "pg_ivm"
    version: "1.5.1"
  - path: "/local/path/to/extension"
postgres:
  version: "15"
```

## Fields

### `apiVersion`

* **Description**: Defines the API version to ensure compatibility with pgxman.
* **Type**: String
* **Required**: Yes
* **Supported Values**: As of now, only `v1` is supported.

### `extensions`

* **Description**: Lists the extensions to be installed.
* **Type**: List of objects
* **Required**: No
* **Object Fields**:
  * `name`:
    * **Description**: Specifies the name of the extension. Either the `name` or the `path` field must be present.
    * **Type**: String
    * **Required**: No
  * `version`:
    * **Description**: Specifies the version of the extension. This field is mandatory if the `name` field is provided.
    * **Type**: String
    * **Required**: Yes if `name` is present
  * `path`:
    * **Description**: Specifies the local path to the extension package. Either the `name` or the `path` field must be present.
    * **Type**: String
    * **Required**: No
  * `options`:
    * **Description**: Specifies the options to be passed to corresponding package manager when installing the extension.
    * **Type**: List of strings
    * **Required**: No
  * `overwrite`:
    * **Description**: Overwrite the existing extension if it is installed outside of pgxman.
    * **Type**: Boolean
    * **Required**: No
    * **Default Value**: false

### `postgres`

* **Description**: Specifies the PostgreSQL configuration that the extensions are targeting.
* **Type**: Object
* **Required**: Yes
* **Object Fields**:
  * `version`:
    * **Description**: Specifies the PostgreSQL version. This field is mandatory.
    * **Type**: String
    * **Required**: Yes
    * **Supported Values**: `"13"`, `"14"`, `"15"`, `"16"`
  * `username`
    * **Description**: Specifies the database username to connect to a PostgreSQL instance. This field is optional.
    * **Type**: String
    * **Required**: No
  * `password`
    * **Description**: Specifies the database password to connect to a PostgreSQL instance. This field is optional.
    * **Type**: String
    * **Required**: No
  * `dbname`
    * **Description**: Specifies the database name to connect to a PostgreSQL instance. This field is optional.
    * **Type**: String
    * **Required**: No
  * `port`
    * **Description**: Specifies the database port to connect to a PostgreSQL instance. This field is optional.
    * **Type**: String
    * **Required**: No
