Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
700 stars 145 forks source link

Build documentation #52

Closed waypointsoftware closed 9 years ago

waypointsoftware commented 10 years ago

It should be noted that you need to have the following things installed prior to using/building this project:

  1. pg_config needs to be in your path. for postgres 9.3 its in /usr/pgsql-9.3/bin
  2. python 2.7 is required and if you have to build and install it you have to make it your default python
  3. python-devel is required
waypointsoftware commented 10 years ago

Also:

  1. When I build the code I am unable to create the extension in the database because the files its looking for are in the build folder and not in /usr/pgsql-9.3/share/extension/. I had to manually copy the multicorn.control and the sql files in the sql folder over to the pg extension folder. Was the make install supposed to copy those files there?
  2. The "implementors" documentation does not describe how to create the server. All it has is how to create the table, so I have to grab it from the Usage documentation and modify it to fit the example
  3. It is not clear from your example where the myfdw.py is supposed to go. I am assuming that it needs to be somewhere that python2.7 can find.
  4. It seems to be required that python2.7 is your default python. Otherwise postgres uses the default to run the python code and if its not at least 2.7 its going to fail to import the multicorn library
rdunklau commented 10 years ago

Sorry to get back at you that late. Thank you for these sugggestions, I implemented some of them in the documentation.

Regarding 4), the extension should have been copied when you ran make install, unless your pg_config does not match your intended postgresql destination.

Regarding 7), it is more complicated than that. If your postgresql version has been compiled with the --with-python option, it will use this one. If it didn't, it will use the default. You can override that with the environment variable PYTHON_OVERRIDE, for example:

PYTHON_OVERRIDE=~/python3.3/bin/python make install