2
0

Merge pull request #552 from kingluo/patch-3

send simple query if no args
This commit is contained in:
Jack Christensen
2019-06-29 12:05:31 -04:00
committed by GitHub
+4
View File
@@ -522,6 +522,10 @@ func (c *Conn) readUntilRowDescription() ([]FieldDescription, error) {
}
func (c *Conn) sanitizeAndSendSimpleQuery(sql string, args ...interface{}) (err error) {
if len(args) == 0 {
return c.sendSimpleQuery(sql)
}
if c.RuntimeParams["standard_conforming_strings"] != "on" {
return errors.New("simple protocol queries must be run with standard_conforming_strings=on")
}