# DocumentDBPostgresVersion

- Kind: `enum`
- Package: [Aspire.Hosting.DocumentDB](/reference/api/csharp/aspire.hosting.documentdb.md)
- Version: `0.111.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/azure-databases-aspire/blob/d8d44d4322ce04a98c27e15113a2ecacf12152d8//home/runner/work/azure-databases-aspire/azure-databases-aspire/src/Aspire.Hosting.DocumentDB/DocumentDBPostgresVersion.cs)

Selects which PostgreSQL major version of the `documentdb-local` container image to use.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public enum DocumentDBPostgresVersion
```

## Remarks

Upstream publishes the same DocumentDB version against multiple PostgreSQL backend versions. Use with [DocumentDBBuilderExtensions.WithPostgresVersion(IResourceBuilder<DocumentDBServerResource>, DocumentDBPostgresVersion)](/reference/api/csharp/aspire.hosting.documentdb/documentdbbuilderextensions/methods.md#withpostgresversion-iresourcebuilder-documentdbserverresource-documentdbpostgresversion) to select a non-default backend. Adding new variants (for example `Pg18`) is intentionally a manual code change that requires review.

## Enum Members

| Name | Value | Description |
| --- | --- | --- |
| Pg15 | 15 | PostgreSQL 15 backend (pg15- tag prefix). |
| Pg16 | 16 | PostgreSQL 16 backend (pg16- tag prefix). |
| Pg17 | 17 | PostgreSQL 17 backend (pg17- tag prefix). Default. |
