pggeodb.nancy.inra.fr/db_robot - db_robot on pggeodb.nancy.inra.fr
Previous topic Chapter index Next topic

Function: unlockrows

 

 

Schema

public

 

Owner

albenard

 

Descriptions

args: auth_token - Remove all locks held by specified authorization id. Returns the number of locks released.

 

Options

Option

Value

Returns

integer

Language

plpgsql

Parameters

text

 

Definition

CREATE OR REPLACE FUNCTION public.unlockrows (
 text
)
RETURNS integer AS
$span$
DECLARE

ret int;
BEGIN

IF
NOT LongTransactionsEnabled() THEN
RAISE EXCEPTION
'Long transaction support disabled, use EnableLongTransaction() to enable.';
END IF;

EXECUTE 'DELETE FROM authorization_table where authid = ' ||
quote_literal($1);

GET DIAGNOSTICS ret = ROW_COUNT;

RETURN ret;
END;
$span$
LANGUAGE
'plpgsql'
VOLATILE
RETURNS NULL ON NULL INPUT
SECURITY INVOKER
COST
100;

COMMENT ON FUNCTION public.unlockrows(text)
IS 'args: auth_token - Remove all locks held by specified authorization id. Returns the number of locks released.';

This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 26/02/2014 11:51
Previous topic Chapter index Next topic