functions.py 267 B

123456789
  1. GENERATE_ISSUE_TSVECTOR = """
  2. CREATE OR REPLACE FUNCTION generate_issue_tsvector(jsonb) RETURNS tsvector AS $$
  3. BEGIN
  4. RETURN strip(jsonb_to_tsvector($1, '["string"]'));
  5. EXCEPTION WHEN program_limit_exceeded THEN
  6. RETURN null;
  7. END;
  8. $$ LANGUAGE plpgsql;;
  9. """