<commit_before>-------------------------------------------------------------------------------
-- Adapted from https://github.com/robconery/pg-auth

begin;

-- comment out the role creation statements if
-- you want to run this script more than once
create role anon;
create role author;
create role authenticator noinherit;
grant anon, author to authenticator;

create extension if not exists pgcrypto;
create extension if not exists "uuid-ossp";

-- We put things inside the basic_auth schema to hide
-- them from public view. Certain public procs/views will
-- refer to helpers and tables inside.
create schema if not exists basic_auth;

-------------------------------------------------------------------------------
-- Utility functions

create or replace function
basic_auth.clearance_for_role(u name) returns void as
$$
declare
  ok boolean;
begin
  select exists (
    select rolname
      from pg_authid
     where pg_has_role(current_user, oid, 'member')
       and rolname = u<commit_msg>remove unnessecary create extension "uuid-ossp"<commit_after>-------------------------------------------------------------------------------
-- Adapted from https://github.com/robconery/pg-auth

begin;

-- comment out the role creation statements if
-- you want to run this script more than once
create role anon;
create role author;
create role authenticator noinherit;
grant anon, author to authenticator;

create extension if not exists pgcrypto;

-- We put things inside the basic_auth schema to hide
-- them from public view. Certain public procs/views will
-- refer to helpers and tables inside.
create schema if not exists basic_auth;

-------------------------------------------------------------------------------
-- Utility functions

create or replace function
basic_auth.clearance_for_role(u name) returns void as
$$
declare
  ok boolean;
begin
  select exists (
    select rolname
      from pg_authid
     where pg_has_role(current_user, oid, 'member')
       and rolname = u
{'fraction_non_alphanumeric': 0.21177062374245473, 'fraction_numerical': 0.0, 'mean_word_length': 2.0182094081942337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4006958', 'n_tokens_mistral': 487, 'n_tokens_neox': 474, 'n_words': 207}