Pervasive logo

Prev SQL Engine Reference Next

X$Rights


The X$Rights system table is associated with the file RIGHTS.DDF. X$Rights contains access rights information for each user. Pervasive.SQL uses this table only when you enable the security option. The structure of X$Rights is as follows:

 
Table C-18 X$Rights System Table Structure

Column Name
Type
Size
Case Insensitive
Description
Xr$User
USMALLINT
2
N/A
User ID
Xr$Table
USMALLINT
2
N/A
Table ID
Xr$Column
USMALLINT
2
N/A
Column ID
Xr$Rights
UTINYINT
1
N/A
Table or column rights flag

The Xr$User column corresponds to the Xu$Id column in the X$User table. The Xr$Table column corresponds to the Xf$Id column in the X$File table. The Xr$Column column corresponds to the Xe$Id column in the X$Field table.


Note
For any row in the system table that describes table rights, the value for Xr$Column is null.

The Xr$Rights column contains integer values whose rightmost 8 bits define the users' access rights. The following table describes how Pervasive.SQL interprets the value. Values from this table may be combined into a single Xr$Rights value.

 
Table C-19 Xr$Rights System Table Bit Position Definitions

Hex Value
Decimal Equivalent
Description
1
1
Reorganization in progress.
0x90
144
References rights to table.
0xA0
160
Alter Table rights.
0x40
64
Select rights to table or column.
0x82
130
Update rights to table or column.
0x84
132
Insert rights to table or column.
0x88
136
Delete rights to table or column.

A decimal equivalent of 0 implies no rights.

The value in the Xr$Rights column for a particular user is the bit-wise intersection of the hex values corresponding to the access rights that apply to the user. It is not the sum of the decimal values.

For example, the value in Xr$Rights for a user with all rights assigned would be represented as follows:

144 | 160 | 64 | 130 | 132 | 136 = 254

Three indexes are defined for the X$Rights table, as follows:

 
Table C-20 X$Rights System Table Index Definitions

Index Number
Segment Number
Column Name
Duplicates
Case Insensitive
Segmented
0
0
Xr$User
Yes
N/A
No
1
0
Xr$User
No
N/A
Yes
1
1
Xr$Table
No
N/A
Yes
1
2
Xr$Column
No
N/A
No
2
0
Xr$Table
Yes
N/A
Yes
2
1
Xr$Column
Yes
N/A
No


Prev
X$User
Contents
Up
Check for Revisions
Next
X$Relate