Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Cyril Gaudin <[email protected]>
  • Loading branch information
stanleyz and cyrilgdn committed Oct 25, 2024
1 parent 1deb31b commit 4f1956f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions postgresql/resource_postgresql_security_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func resourcePostgreSQLSecurityLabelCreate(db *DBConnection, d *schema.ResourceD
db.version,
)
}
log.Printf("[WARN] PostgreSQL security label Create")
log.Printf("[DEBUG] PostgreSQL security label Create")
label := d.Get(securityLabelLabelAttr).(string)
if err := resourcePostgreSQLSecurityLabelUpdateImpl(db, d, pq.QuoteLiteral(label)); err != nil {
if err := resourcePostgreSQLSecurityLabelUpdateImpl(db, d, label); err != nil {
return err
}

Expand All @@ -88,7 +88,7 @@ func resourcePostgreSQLSecurityLabelUpdateImpl(db *DBConnection, d *schema.Resou

if _, err := db.Exec(b.String()); err != nil {
log.Printf("[WARN] PostgreSQL security label Create failed %s", err)
return err
return fmt.Errorf("could not create security label: %w", err)
}
return nil
}
Expand All @@ -100,7 +100,7 @@ func resourcePostgreSQLSecurityLabelRead(db *DBConnection, d *schema.ResourceDat
db.version,
)
}
log.Printf("[WARN] PostgreSQL security label Read")
log.Printf("[DEBUG] PostgreSQL security label Read")

return resourcePostgreSQLSecurityLabelReadImpl(db, d)
}
Expand Down

0 comments on commit 4f1956f

Please sign in to comment.