> Thanks Kretschmer but I have seen those function. The below query returns error > but you could see that 'user1' has ALL permissions on table 'techtable'. > > techdb=# SELECT has_table_privilege('user1', 'techtable', 'ALL'); > ERROR: unrecognized privilege type: "ALL" >
> Do I have to run this command as below which includes all permissions > explicitly? Did I miss anything?
Right, you have to name all privileges.
The desired access privilege type is specified by a text string, which must evaluate to one of the values SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, or TRIGGER.