updated init script and docker file for pair functions

This commit is contained in:
Andrei Stoica 2022-08-18 11:56:56 -04:00
parent 91e09709e0
commit 04200b41ce
2 changed files with 7 additions and 5 deletions

View File

@ -7,4 +7,8 @@ RUN apt-get -y install python3 \
RUN python3 -m pip install sentence-transformers RUN python3 -m pip install sentence-transformers
ADD init.sql /docker-entrypoint-initdb.d ADD ./init.sql /docker-entrypoint-initdb.d/init.sql
RUN chown postgres:postgres /docker-entrypoint-initdb.d/init.sql
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 5432
CMD ["postgres"]

View File

@ -1,7 +1,6 @@
CREATE EXTENSION plpython3u; CREATE EXTENSION plpython3u;
DROP FUNCTION text_pairs; CREATE FUNCTION text_pairs(list TEXT[])
CREATE OR REPLACE FUNCTION text_pairs(list TEXT[])
RETURNS SETOF TEXT[] RETURNS SETOF TEXT[]
LANGUAGE plpgsql AS LANGUAGE plpgsql AS
$$ $$
@ -21,8 +20,7 @@ END;
$$; $$;
DROP FUNCTION int_pairs; CREATE FUNCTION int_pairs(list INTEGER[])
CREATE OR REPLACE FUNCTION int_pairs(list INTEGER[])
RETURNS SETOF INTEGER[] RETURNS SETOF INTEGER[]
LANGUAGE plpgsql AS LANGUAGE plpgsql AS
$$ $$