2
0

Adds a tricky user to test

This allows us to test aclitem encoding
with tricky SQL identifiers. The user actually
has to exist, or the aclitem will be incorrect.
This commit is contained in:
Manni Wood
2016-10-27 21:57:46 -04:00
parent f73791c6c9
commit df033d499f
4 changed files with 15 additions and 1 deletions
+12 -1
View File
@@ -265,7 +265,18 @@ func (n NullString) Encode(w *WriteBuf, oid Oid) error {
return encodeString(w, oid, n.String)
}
// AclItem is used for PostgreSQL's aclitem data type.
// AclItem is used for PostgreSQL's aclitem data type. A sample aclitem
// might look like this:
//
// postgres=arwdDxt/postgres
//
// Note, however, that because the user/role name part of an aclitem is
// an identifier, it follows all the usual formatting rules for SQL
// identifiers: if it contains spaces and other special characters,
// it should appear in double-quotes:
//
// postgres=arwdDxt/"role with spaces"
//
type AclItem string
// NullAclItem represents a pgx.AclItem that may be null. NullAclItem implements the