Dynamic variable binding
This commit is contained in:
parent
6baa626756
commit
9a3fbb668c
@ -118,7 +118,7 @@ FUNCTION cartodb._CDB_User_RoleFromUsername(username text)
|
||||
DECLARE
|
||||
user_role TEXT;
|
||||
BEGIN
|
||||
EXECUTE 'SELECT SCHEMA_OWNER FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = ''' || username || ''' LIMIT 1' INTO user_role;
|
||||
EXECUTE 'SELECT SCHEMA_OWNER FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = $1 LIMIT 1' INTO user_role USING username;
|
||||
RETURN user_role;
|
||||
END
|
||||
$$ LANGUAGE PLPGSQL;
|
||||
|
Loading…
Reference in New Issue
Block a user