Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@mask |
integer |
integer |
@path_type |
integer |
integer |
Return Value |
nvarchar(128) |
varchar(128) |
Description: Converts an NTFS access mask value to its basic permissions string equivalent.
Note that the values displayed here are functionally equivalent to what is seen in the primary window of the security tab for an NTFS file system entry:
Entries having permissions that do not fit the basic permissions (such as Special permissions) include an asterisk *.
The path_type is required since the same flags represent different semantic values for folders, files and shares. Path type must be one of 1 (file), 2 (folder) or 7 (share).
Permissions flags are mapped to one or more of the following values:
Full Control
Modify
Read and Execute
List Folder Contents (Folders only)
Read
Write
Special Permissions
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@mask |
integer |
integer |
@path_type |
integer |
integer |
Return Value |
nvarchar(128) |
varchar(128) |
Description: Converts an NTFS access mask value to its advanced permissions string equivalent.
Note that the values displayed here are functionally equivalent to what is seen in the advanced section of the security tab for an NTFS file system entry:
The path_type is required since the same flags represent different semantic values for folders, files and shares. Path type must be one of 1 (file), 2 (folder) or 7 (share).
Flags correspond to the following values:
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@domain |
nvarchar(1024) |
varchar(1024) |
@name |
nvarchar(1024) |
varchar(1024) |
@sid |
binary(68) |
bytea |
Return Value |
nvarchar(max) |
text |
Description: Converts primary naming values for an Windows security principal to a display name.
If domain is null or empty, the leading backslash is not included in the result.
If the name is null or empty, the result value is the SDDL sid representation.
If the sid is needed but is invalid, the return value is [Invalid SID].
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@flags |
integer |
integer |
Return Value |
nvarchar(128) |
varchar(128) |
Description: Converts the access mask flag to a string representation. Flags are converted as follows:
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@ace_type |
integer |
integer |
Return Value |
nvarchar(128) |
varchar(128) |
Description: Converts the access mask type value to a corresponding text value.
Flags correspond as follows:
For NTFS file systems, the primary values of concern are Allowed (0), Denied (1), Audit (2), and System Mandatory Label (17).
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@flags |
integer |
integer |
Return Value |
nvarchar(256) |
varchar(256) |
Description: Converts an attributes value to its equivalent string representation. Flags correspond to the following values:
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@guid_text |
nvarchar(38) |
varchar(38) |
Return Value |
varbinary(16) |
bytea |
Description: Converts a compatible guid text string to its equivalent binary representation.
Recommended input format: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}.
Surrounding braces are optional.
Hex values A-F may be in upper or lower case.
Hyphen separators must be present at the specified 4 locations, or not at all.
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@guid_binary |
varbinary(16) |
bytea |
Return Value |
nvarchar(38) |
varchar(38) |
Description: Converts a binary guid value to its equivalent string representation. Note that returned guid strings are in the format {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}. All hex values are returned with uppercase A-F.
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@rights |
integer |
integer |
Return Value |
nvarchar(8) |
varchar(8 |
Description: Converts an NCP trustee rights flag to its equivalent string representation. Flags correspond to the following values
Rights are displayed in the order: SRWCEMFA
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@path |
nvarchar(max) |
text |
Return Value |
binary(20) |
bytea |
Description: Returns the binary SHA-1 hash for a given path.
The input path is first converted to lower-case.
Useful for finding a fullpath in the srs.scan_data table using the fullpath_hash index.
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@sid |
nvarchar(1024) |
varchar(1024) |
Return Value |
varbinary(68) |
bytea |
Description: Converts an SDDL representation of a Security Identifier value to its binary form.
Input SID values must be in proper SDDL form.
Parameters |
SQL Server |
PostgreSQL |
---|---|---|
@sid_bytes |
varbinary(68) |
bytea |
Return Value |
nvarchar(1024) |
varchar(1024) |
Description: Converts binary Security Identifier to its SDDL string representation.