-
Notifications
You must be signed in to change notification settings - Fork 733
Closed
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagespostgresIssues related to Postgres integrationsIssues related to Postgres integrations
Milestone
Description
When providing a custom name for a database, the builder.AddPostgresContainer("pg").AddDatabase("postgresdb") methods do not seem to create the database in the Postgres container. For example, with the following code:
var postgresdb = builder.AddPostgresContainer("catalog").AddDatabase("catalogdb");
var postgres = builder.AddProject<Projects.AspireSQL>("aspirepostgres")
.WithReference(postgresdb);
And:
builder.AddNpgsqlDataSource("catalogdb");
I receive this error:
PostgresException: 3D000: database "catalogdb" does not exist
When I use psql commands in the container to view the list of databases, it looks like this:
Should I expect to see a "catalogdb" database listed here?
The connection and query does work if I switch to AddDatabase("postgres") to use the default database.
YandyZaldivar and KennethHofftmds and krafs
Metadata
Metadata
Assignees
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagespostgresIssues related to Postgres integrationsIssues related to Postgres integrations