# Aspire.Hosting.PostgreSQL

- Module: `Aspire.Hosting.PostgreSQL`
- Version: `13.2.0`
- Source: [GitHub](https://github.com/microsoft/aspire)
- Functions: `14`
- Types: `5`

## Types

- [PgAdminContainerResource](/reference/api/typescript/aspire.hosting.postgresql/pgadmincontainerresource.md) -- `handle` - 1 members
- [PgWebContainerResource](/reference/api/typescript/aspire.hosting.postgresql/pgwebcontainerresource.md) -- `handle` - 1 members
- [PostgresDatabaseResource](/reference/api/typescript/aspire.hosting.postgresql/postgresdatabaseresource.md) -- `handle` - 8 members
- [PostgresMcpContainerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresmcpcontainerresource.md) -- `handle` - 0 members
- [PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md) -- `handle` - 26 members

## Functions

- [addDatabase](/reference/api/typescript/aspire.hosting.postgresql/adddatabase.md) -- `method` -- Adds a PostgreSQL database
- [addPostgres](/reference/api/typescript/aspire.hosting.postgresql/addpostgres.md) -- `method` -- Adds a PostgreSQL server resource
- [withCreationScript](/reference/api/typescript/aspire.hosting.postgresql/withcreationscript.md) -- `method` -- Defines the SQL script for database creation
- [withDataBindMount](/reference/api/typescript/aspire.hosting.postgresql/withdatabindmount.md) -- `method` -- Adds a data bind mount for PostgreSQL
- [withDataVolume](/reference/api/typescript/aspire.hosting.postgresql/withdatavolume.md) -- `method` -- Adds a data volume for PostgreSQL
- [withHostPort](/reference/api/typescript/aspire.hosting.postgresql/withhostport.md) -- `method` -- Sets the host port for pgAdmin
- [withHostPort](/reference/api/typescript/aspire.hosting.postgresql/withhostport.md) -- `method` -- Sets the host port for pgweb
- [withHostPort](/reference/api/typescript/aspire.hosting.postgresql/withhostport.md) -- `method` -- Sets the host port for PostgreSQL
- [withInitFiles](/reference/api/typescript/aspire.hosting.postgresql/withinitfiles.md) -- `method` -- Copies init files to PostgreSQL
- [withPassword](/reference/api/typescript/aspire.hosting.postgresql/withpassword.md) -- `method` -- Configures the PostgreSQL password
- [withPgAdmin](/reference/api/typescript/aspire.hosting.postgresql/withpgadmin.md) -- `method` -- Adds pgAdmin 4 management UI
- [withPgWeb](/reference/api/typescript/aspire.hosting.postgresql/withpgweb.md) -- `method` -- Adds pgweb management UI
- [withPostgresMcp](/reference/api/typescript/aspire.hosting.postgresql/withpostgresmcp.md) -- `method` -- Adds Postgres MCP server
- [withUserName](/reference/api/typescript/aspire.hosting.postgresql/withusername.md) -- `method` -- Configures the PostgreSQL user name
