Schema
Owner
postgres
Descriptions
There is no description for function addtosearchpath
Options
Option | Value |
---|---|
Returns |
text |
Language |
|
Parameters |
a_schema_name varchar |
Definition
CREATE OR REPLACE FUNCTION topology.addtosearchpath (
a_schema_name varchar
)
RETURNS text AS
$span$
DECLARE
var_result text;
var_cur_search_path text;
BEGIN
SELECT reset_val INTO var_cur_search_path FROM pg_settings WHERE name = 'search_path';
IF var_cur_search_path LIKE '%' || quote_ident(a_schema_name) || '%' THEN
var_result := a_schema_name || ' already in database search_path';
ELSE
var_cur_search_path := var_cur_search_path || ', '
|| quote_ident(a_schema_name);
EXECUTE 'ALTER DATABASE ' || quote_ident(current_database())
|| ' SET search_path = ' || var_cur_search_path;
var_result := a_schema_name || ' has been added to end of database search_path ';
END IF;
EXECUTE 'SET search_path = ' || var_cur_search_path;
RETURN var_result;
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 07/12/2018 13:23 |