CheckAuth
Prev | 8.21. Long Transaction Support | Next

## Name

CheckAuth — Creates a trigger on a table to prevent/allow updates and deletes of rows based on authorization token.

## Synopsis

`integer CheckAuth(`text a_schema_name, text a_table_name, text a_key_column_name`)`;

`integer CheckAuth(`text a_table_name, text a_key_column_name`)`;

## Description

Creates trigger on a table to prevent/allow updates and deletes of rows based on an authorization token. Identify rows using <rowid_col> column.

If a_schema_name is not passed in, then searches for table in current schema.

If an authorization trigger already exists on this table function errors. If Transaction support is not enabled, function throws an exception.

Availability: 1.1.3

## Examples

    			SELECT CheckAuth('public', 'towns', 'gid');
    			result
    			------
    			0

## See Also

EnableLongTransactions

Prev | Up | Next
AddAuth | Home | DisableLongTransactions