<commit_before>select AddGeometryColumn('rooms', 'geom', 2163, 'POINT', 2);
select AddGeometryColumn('clients', 'geom', 2163, 'POINT', 2);

CREATE OR REPLACE FUNCTION update_room_geom() RETURNS trigger AS $$
BEGIN
  NEW.geom := ST_Transform(ST_GeomFromText('POINT(' || NEW.lng || ' ' || NEW.lat || ')', 4326), 2163);
  return NEW;
END;
$$ LANGUAGE plpgsql;

DROP TRIGGER IF EXISTS update_room_geom_trigger ON rooms;
CREATE TRIGGER update_room_geom_trigger BEFORE INSERT ON rooms FOR EACH ROW EXECUTE PROCEDURE update_room_geom();

<commit_msg>create gist indexes on geom columns<commit_after>select AddGeometryColumn('rooms', 'geom', 2163, 'POINT', 2);
select AddGeometryColumn('clients', 'geom', 2163, 'POINT', 2);

CREATE OR REPLACE FUNCTION update_room_geom() RETURNS trigger AS $$
BEGIN
  NEW.geom := ST_Transform(ST_GeomFromText('POINT(' || NEW.lng || ' ' || NEW.lat || ')', 4326), 2163);
  return NEW;
END;
$$ LANGUAGE plpgsql;

DROP TRIGGER IF EXISTS update_room_geom_trigger ON rooms;
CREATE TRIGGER update_room_geom_trigger BEFORE INSERT ON rooms FOR EACH ROW EXECUTE PROCEDURE update_room_geom();

CREATE INDEX rooms_geom_idx  ON rooms  USING GIST (geom);
CREATE INDEX clients_geom_idx  ON clients  USING GIST (geom);

{'fraction_non_alphanumeric': 0.11889250814332247, 'fraction_numerical': 0.029315960912052116, 'mean_word_length': 6.229411764705882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7269248', 'n_tokens_mistral': 473, 'n_tokens_neox': 432, 'n_words': 125}