Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ postgres=#
postgresListCmd.Flags().StringP("tenant", "", "", "tenant to filter [optional]")
postgresListCmd.Flags().StringP("project", "", "", "project to filter [optional]")
postgresListCmd.Flags().StringP("partition", "", "", "partition to filter [optional]")
postgresListCmd.Flags().StringP("postgres-version", "", "", "postgres version to filter [optional, semver filter]")

postgresDemoteToStandbyCmd.Flags().BoolP("disable-loadbalancers", "", false, "disable connections with the public loadbalancer IP [optional]")
postgresPromoteToPrimaryCmd.Flags().BoolP("disable-loadbalancers", "", false, "disable connections with the public loadbalancer IP [optional]")
Expand Down Expand Up @@ -941,7 +942,7 @@ func readPostgresUpdateRequests(filename string) ([]models.V1PostgresUpdateReque
}

func (c *config) postgresFind() error {
if helper.AtLeastOneViperStringFlagGiven("id", "description", "tenant", "project", "partition") {
if helper.AtLeastOneViperStringFlagGiven("id", "description", "tenant", "project", "partition", "postgres-version") {
params := database.NewFindPostgresParams()
ifr := &models.V1PostgresFindRequest{}
id := helper.ViperString("id")
Expand All @@ -964,6 +965,10 @@ func (c *config) postgresFind() error {
if partitionID != nil {
ifr.PartitionID = *partitionID
}
versionFilter := helper.ViperString("postgres-version")
if versionFilter != nil {
ifr.Version = *versionFilter
}

params.SetBody(ifr)
resp, err := c.cloud.Database.FindPostgres(params, nil)
Expand Down
Loading