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

Function: _drop_raster_constraint

 

 

Schema

public

 

Owner

albenard

 

Descriptions

There is no description for function _drop_raster_constraint

 

Options

Option

Value

Returns

boolean

Language

plpgsql

Parameters

rastschema name

rasttable name

cn name

 

Definition

CREATE OR REPLACE FUNCTION public._drop_raster_constraint (
 rastschema name,
 rasttable name,
 cn name
)
RETURNS boolean AS
$span$
DECLARE

fqtn text;
BEGIN
fqtn := '';
IF length($1) > 0 THEN
fqtn := quote_ident($1) || '.';
END IF;
fqtn := fqtn || quote_ident($2);

BEGIN
EXECUTE
'ALTER TABLE '
|| fqtn
|| ' DROP CONSTRAINT '
|| quote_ident(cn);
RETURN TRUE;
EXCEPTION
WHEN
undefined_object THEN
RAISE NOTICE
'The constraint "%" does not exist.  Skipping', cn;
WHEN OTHERS THEN
RAISE NOTICE
'Unable to drop constraint "%": % (%)',
         cn, SQLERRM, SQLSTATE;
RETURN FALSE;
END;

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

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