CREATETAB,
CREATESP,
CREATEVIEW, and
LOGIN TO arguments are extensions to the core SQL grammar. You can use the
GRANT statement to grant privileges for
CREATE TABLE,
CREATE VIEW, and
CREATE PROCEDURE, and to create a user account with password as a member of an already created group.
The Master user can create groups and other users using the GRANT LOGIN TO,
CREATE USER or
CREATE GROUP commands and define data access permissions for these groups and users.
After the GRANT statement containing the owner name has been issued for a given user, that user can access the specified table by logging into the database, without specifying the owner name each time. (Also note that the SET OWNER statement allows you to specify one or more owner names for use during the current database connection. See
SET OWNER.)
If a table has an owner name with the Read-Only attribute, the Master user automatically has SELECT rights on this table without specifically granting himself/herself the
SELECT rights with the owner name.
A trusted view or stored procedure is one that can be executed without having to explicitly set permissions for each referenced object. For example, if trusted view “myview1” references tables “t1” and “t2,” the Master user can grant a user permissions on “myview1” without having to grant the user permissions on “t1” and “t2.”
A non-trusted view or stored procedure is one that cannot be executed without having to explicitly set permissions for each referenced object.
A GRANT ALL statement grants the
INSERT, UPDATE, ALTER, SELECT, DELETE and
REFERENCES rights to the specified user or group. In addition, the user or group is granted the
CREATE TABLE right for the dictionary. The following statement grants all these privileges to user
dannyd for table
Class.
The following statement gives INSERT privileges to keithv and
miked for table
Class. The table has an owner name of
winsvr644AdminGrp.
The following statement grants INSERT privileges on two columns, First_name and Last_name, in the
Person table to users
keithv and
brendanb
The following statement grants CREATE TABLE rights to users aideenw and punitas
The following GRANT LOGIN TO statement grants login rights to a user named
ravi and specifies his password as
password.
The user name and password here only refer to Pervasive PSQL databases and are not related to user names and passwords set at the operating system level. Pervasive PSQL user names, groups, and passwords can also be set through the Pervasive PSQL Control Center (PCC).
The following example grants login rights to users named dannyd and travisk and specifies their passwords as
password and
1234567 respectively.
The following example grants the SELECT rights to the Master user on table T1 that has a Btrieve owner name of “abcd.”
The following example grants EXECUTE permissions on stored procedure cal_rtrn_rate to
all users.