Last active
November 2, 2016 14:31
-
-
Save kitsuyui/2ce05422a86fb65d718963f97a8e6dc8 to your computer and use it in GitHub Desktop.
Docker で PostgreSQL の FDW を使って MySQL や Redis と JOIN してみた ref: http://qiita.com/kitsuyui/items/c2cd38daa78d1eb07a3c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM quay.io/aptible/postgresql:9.5-contrib | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update \ | |
&& apt-get -y install git gcc make libhiredis-dev \ | |
&& mkdir -p /inst/ \ | |
&& cd /inst \ | |
&& git clone https://github.com/pg-redis-fdw/redis_fdw.git --branch REL9_5_STABLE --single-branch \ | |
&& cd /inst/redis_fdw \ | |
&& PATH=/usr/local/postgresql/bin/:$PATH make USE_PGXS=1 \ | |
&& PATH=/usr/local/postgresql/bin/:$PATH make USE_PGXS=1 install \ | |
&& apt-get purge -y --auto-remove git gcc make \ | |
&& rm -Rf /inst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM sample_redis AS SR | |
INNER JOIN sample_mysql AS SM | |
ON SR.val::int = SM.id | |
INNER JOIN sample_postgres AS SP | |
ON SR.key = SP.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment