CheckAuth

Name

CheckAuth — Creates 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 authorization token. Identify rows using <rowid_col> column.

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

[Note]

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