How to delete constraint inside a trigger function
I think you want to set your foreign key DEFERRABLE INITIALLY DEFERRED so that you don't have to drop and recreate it every time there is an INSERT or other data change.  Maybe even this is not needed, but it depends on what happens in the rest of the transaction.

Then the rest is just 

IF tg_op = 'INSERT
THEN
    INSERT INTO points (gid, fookey)
    VALUES (0, NEW.fookey);

    UPDATE points 
    SET fookey = NEW.fookey
    WHERE ST_Within(points.geom, NEW.geom);
ELSIF ...


Notes:


you cannot COMMIT from inside a function
the DB is either PostgreSQL or Postgres, not Postgre.
logically, this is more an AFTER trigger than a BEFORE one.