2
0

Parses actual return string

...but only handles aclitem[] size 1
This commit is contained in:
Manni Wood
2016-11-12 11:56:04 -05:00
parent a80ef6d35f
commit 36bdbd7cb1
2 changed files with 11 additions and 2 deletions
+10 -1
View File
@@ -3009,7 +3009,16 @@ func encodeAclItemSlice(w *WriteBuf, oid Oid, value []AclItem) error {
// XXX: decodeAclItemArray; using text encoding, not binary
func decodeAclItemArray(vr *ValueReader) []AclItem {
return []AclItem{"=r/postgres"}
if vr.Len() == -1 {
vr.Fatal(ProtocolError("Cannot decode null into []AclItem"))
return nil
}
str := vr.ReadString(vr.Len())
// remove the '{' at the front and the '}' at the end
str = str[1 : len(str)-1]
return []AclItem{AclItem(str)}
// return []AclItem{"=r/postgres"}
}
func encodeStringSlice(w *WriteBuf, oid Oid, slice []string) error {