bsw@1071: -- Formats a value (or a key) for usage in the text representation of bsw@1071: -- hstore fields bsw@1071: bsw@1071: function encode.pg_hstore_value(value) bsw@1071: return '"' .. string.gsub(value, '([\\"])', "\\%1") .. '"' bsw@1071: end