2
0

Hstore can have empty keys

This commit is contained in:
Josh Leverette
2019-05-20 11:30:25 -07:00
parent 8faa4453fc
commit 56f4f0b9d3
+3 -7
View File
@@ -296,13 +296,9 @@ func parseHstore(s string) (k []string, v []Text, err error) {
case hsKey:
switch r {
case '"': //End of the key
if buf.Len() == 0 {
err = errors.New("Empty Key is invalid")
} else {
keys = append(keys, buf.String())
buf = bytes.Buffer{}
state = hsSep
}
keys = append(keys, buf.String())
buf = bytes.Buffer{}
state = hsSep
case '\\': //Potential escaped character
n, end := p.Consume()
switch {