Skip to content

Instantly share code, notes, and snippets.

@andreasknoepfle
Created December 22, 2019 14:01
Show Gist options
  • Save andreasknoepfle/10d54716a003c65ed0183c2b348dda90 to your computer and use it in GitHub Desktop.
Save andreasknoepfle/10d54716a003c65ed0183c2b348dda90 to your computer and use it in GitHub Desktop.
Postgres ASDF uuid

asdf Version Manager & Postgres UUID

Compiling Postgres with UUID to use in asdf

Lately I started using asdf, which is a great version manager for nearly anything (ruby, elixir, node, postgres...) . At my work I sometimes have to switch between different postgres versions, so I was happy that there also is a postgres plugin for asdf. But as soon as I was working on a project that uses UUIDs as primary keys in postgres I ran into postgres not being build with the uuid extension.

ERROR:  could not open extension control file "...some-asdf-path.../uuid-ossp.control": No such file or directory
Also apperantly on Mac systems, there is some trouble with ossp-uuid not being able to compile.

As I ran into some trouble trying to compile this, I just looked into the compile flags brew is using, since the default brew installation always seemed to work.

$ POSTGRES_EXTRA_CONFIGURE_OPTIONS="--enable-dtrace --with-bonjour --with-gssapi --with-ldap --with-libxml --with-libxslt --with-uuid=e2fs --with-pam --with-perl --with-python --with-tcl" asdf install postgres 9.6.1

Hope that anyone running into similar trouble finds this to be of some use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment