Forums MAPPStack

Using psql in Terminal, enabling plpgsql, etc.

Subscribe to Using psql in Terminal, enabling plpgsql, etc. 4 post(s), 3 voice(s)

 
Avatar PKHunter 7 post(s)

Hi. Great work with the basic MAPPstack. Lovely. It works. phpPhpAdmin is a charm.

However, there are many things that are missing in the postgresql installation it seems. Where can I enable plpgsql?

 
Avatar beltran Administrator 371 post(s)

Hi,

You can type all postgreSQL commands in the terminal. Bitnami Stacks won’t interfere with any software already installed on your system so when you type “psql” probably you can not found the command or you are using another postgreSQL installation. To sue this command you should go to the “<installation_directory>/posgresql/bin” and execute ”./psql” directly. Another option is to load all the stack environment an you can type whatever Stack binary, for example:

$ cd <installation_directory>
$ . scripts/setenv.sh
$ pqsql --help

Regarding your second question, I’m not an expert on PostgreSQL but I read that you can modify the database language with this command:

$ <installation_directory>/postgresql/bin/createlang plpgsql <database_name>

I hope it helps.

 
Avatar PKHunter 7 post(s)

Thanks. This is very useful. It’s working. I have uninstalled all other postgresql from my system. I so love this product! Thanks!

Now, one problem. One site that I want to test uses both “mysqli” (MySQL) and postgresql code.

So I have installed both MAMP and MAPP. This leads to useless repetition of Apache and PHP, but so be it. What I am trying to do is that I would like to start both pgsql and mysql (in their own stacks) but use one Apache installation across both. Everything basically works with paths inside my httpd.conf, but the problem I think is with PHP.INI.

Inside the MAPP stack (which is my main one, this apache is what I want to use), I have changed the php.ini to include the “mysql port” and “mysql.sock” commands—which I found to be different across the two stacks by running diff.

But this does not work.

Any idea how I can get both mysql and pgsql to work with the same apache and php install? Basically I am looking for a stack called “MAMPP” :)

Thanks

 
Avatar antonio Administrator 487 post(s)

Hi,

See my answer at http://bitnami.org/forums/forums/1/topics/604

Cheers

Forums MAPPStack