CDB-3030 adapted signature to proper one, added NEWS entry

cdb_userdomain
Kartones 10 years ago
parent fc346e4772
commit 225a236dd8

@ -1,3 +1,12 @@
0.x.0
-----
New features:
- Added CDB_UserDomain
0.2.0dev - 2014-MM-DD
------------------

@ -1,15 +1,15 @@
-- Function that setups user's domain, port and http/https inside his own DB.
-- Function that setups user's host, port and http/https inside his own DB.
-- Used for HTTP table sync functions.
CREATE OR REPLACE FUNCTION CDB_SetUserDomain(domain text, port int8, secure boolean)
CREATE OR REPLACE FUNCTION CDB_SetUserDomain(host text, port int8, secure boolean)
RETURNS VOID AS
$$
DECLARE
sql TEXT;
BEGIN
sql := 'CREATE OR REPLACE FUNCTION public._CDB_UserDomain() '
|| ' RETURNS TABLE (domain text, port int8, secure boolean) '
|| ' RETURNS TABLE (host text, port int8, secure boolean) '
|| ' AS $X$ '
|| ' SELECT ''' || domain || '''::text, ' || port || '::int8, ' || secure || '::boolean '
|| ' SELECT ''' || host || '''::text, ' || port || '::int8, ' || secure || '::boolean '
|| ' $X$ LANGUAGE sql IMMUTABLE';
EXECUTE sql;
RETURN;

Loading…
Cancel
Save