 
 
 --
+-- Name: talks_reviewer_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY talks
+    ADD CONSTRAINT talks_reviewer_fkey FOREIGN KEY (reviewer) REFERENCES users(id);
+
+
+--
 -- Name: talks_room_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 --
 

CREATE FUNCTION speakeremail(integer) RETURNS character varying
    LANGUAGE plpgsql
    AS $_$
declare
  crsr cursor for select speakers.email from speakers join speakers_talks on speakers.id = speakers_talks.speaker where speakers_talks.talk = $1;
  row record;
  curname varchar;
  prevname varchar;
  retval varchar;
begin
  retval=NULL;
  prevname=NULL;
  curname=NULL;
  for row in crsr loop
    prevname=curname;
    curname=row.email;
    if prevname is not null then
      retval = concat_ws(', ', retval, prevname);
    end if;
  end loop;
  retval = concat_ws(', ', retval, curname);
  return retval;
end; $_$;


--

    password text,
    isadmin boolean DEFAULT false,
    room integer,
    name character varying,
    isvolunteer boolean DEFAULT false
);


