Skip to content

Commit

Permalink
fix CONNECTION LIMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaBere committed Apr 25, 2024
1 parent bebe6f2 commit 642669f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgresql/resource_postgresql_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ func setDBConnLimit(db QueryAble, d *schema.ResourceData) error {
connLimit := d.Get(dbConnLimitAttr).(int)
dbName := d.Get(dbNameAttr).(string)
case db.dbTypeCockroachdb == dbTypeCockroachdb && connLimit == 0:

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected case, expected }) (typecheck)

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected case, expected } (typecheck)

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / lint

expected '}', found 'case' (typecheck)

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-crdb (v23.2)

expected '}', found 'case'

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-crdb (v23.2)

syntax error: unexpected case, expected }

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (15)

expected '}', found 'case'

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (15)

syntax error: unexpected case, expected }

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (14)

expected '}', found 'case'

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (14)

syntax error: unexpected case, expected }

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (13)

expected '}', found 'case'

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (13)

syntax error: unexpected case, expected }

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (12)

expected '}', found 'case'

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (12)

syntax error: unexpected case, expected }

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (11)

expected '}', found 'case'

Check failure on line 528 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (11)

syntax error: unexpected case, expected }
return fmt.Errorf("Cockroachdb does not support setting CONNECTION LIMIT to 0"
return fmt.Errorf("Cockroachdb does not support setting CONNECTION LIMIT to 0")

Check failure on line 529 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / lint

expected declaration, found 'return' (typecheck)

Check failure on line 529 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-crdb (v23.2)

expected declaration, found 'return'

Check failure on line 529 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (15)

expected declaration, found 'return'

Check failure on line 529 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (14)

expected declaration, found 'return'

Check failure on line 529 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (13)

expected declaration, found 'return'

Check failure on line 529 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (12)

expected declaration, found 'return'

Check failure on line 529 in postgresql/resource_postgresql_database.go

View workflow job for this annotation

GitHub Actions / test-pg (11)

expected declaration, found 'return'
sql := fmt.Sprintf("ALTER DATABASE %s CONNECTION LIMIT = %d", pq.QuoteIdentifier(dbName), connLimit)
if _, err := db.Exec(sql); err != nil {
return fmt.Errorf("Error updating database CONNECTION LIMIT: %w", err)
Expand Down

0 comments on commit 642669f

Please sign in to comment.