0e891eff7f
All calls to the extension functions should, and are, be properly qualified, so there is no need to keep the cartodb schema in the search_path
11 lines
324 B
PL/PgSQL
11 lines
324 B
PL/PgSQL
-- Returns the cartodb username of the current PostgreSQL session
|
|
CREATE OR REPLACE FUNCTION @extschema@.CDB_Username()
|
|
RETURNS text
|
|
AS $$
|
|
SELECT @extschema@.CDB_Conf_GetConf(concat('api_keys_', session_user))->>'username';
|
|
$$ LANGUAGE SQL
|
|
STABLE
|
|
PARALLEL SAFE
|
|
SECURITY DEFINER
|
|
SET search_path = pg_temp;
|