aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/sql')
-rw-r--r--src/database/sql/sql.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go
index 3a6390d970..96d7742a3c 100644
--- a/src/database/sql/sql.go
+++ b/src/database/sql/sql.go
@@ -301,6 +301,10 @@ type Scanner interface {
//
// An error should be returned if the value cannot be stored
// without loss of information.
+ //
+ // Reference types such as []byte are only valid until the next call to Scan
+ // and should not be retained. Their underlying memory is owned by the driver.
+ // If retention is necessary, copy their values before the next call to Scan.
Scan(src interface{}) error
}