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

Function: _add_overview_constraint

 

 

Schema

public

 

Owner

albenard

 

Descriptions

There is no description for function _add_overview_constraint

 

Options

Option

Value

Returns

boolean

Language

plpgsql

Parameters

ovschema name

ovtable name

ovcolumn name

refschema name

reftable name

refcolumn name

factor integer

 

Definition

CREATE OR REPLACE FUNCTION public._add_overview_constraint (
 ovschema name,
 ovtable name,
 ovcolumn name,
 refschema name,
 reftable name,
 refcolumn name,
 factor integer
)
RETURNS boolean AS
$span$
DECLARE

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

cn := 'enforce_overview_' || $3;

sql := 'ALTER TABLE ' || fqtn
|| ' ADD CONSTRAINT ' || quote_ident(cn)
|| ' CHECK ( public._overview_constraint(' || quote_ident($3)
|| ',' || $7
|| ',' || quote_literal($4)
|| ',' || quote_literal($5)
|| ',' || quote_literal($6)
|| '))';

RETURN  public._add_raster_constraint(cn, sql);
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