The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

Postgresql quick start

Submitted by nk on Sun, 2008-02-03 21:15

Postgresql is user friendly in the old fashioned way: it's just picky about it's friends. After getting postgresql up and running on my laptop, I can't say I love it more than before -- let's say, even less. Let me remind you that after installing mysql, you are up and running immediately, and if you use mysql for localhost only, having a single, passwordless root works fine.

But postgresql... first you change your Unix user to postgres, enter psql and run these:

GRANT all ON DATABASE drupal TO drupal;

and then edit a pg_hba.conf . The place of this file is almost never specified, I checked many guides. Of course there are so many Linux distributions, this is impossible... WRONG! There are Debian/Ubuntu, RHEL/Centos, Gentoo -- finished. Surely it's too big a work for the documentation of the Elitest Database in the World to cover these three. Anyways, under Ubuntu peeking into the /etc/init.d/postgresql-8.1 script reveals "Setting environment variables for the postmaster here does not work; please set them in /etc/postgresql/8.1//environment instead." hoho! So under Ubuntu, we need to edit /etc/postgresql/8.1/main/pg_hba.conf and change the "ident sameuser" entry to "md5" in the "local all all" line. Restart postgresql with the aformentioned init.d script and psql -U drupal now works. Easy as everything in postgresql.

Commenting on this Story is closed.

Submitted by on Sun, 2008-02-03 22:23.

You mean createuser username?

I've also never had to edit the pg_hba.conf on my local machine, so i think you might be mistaken. But then, i've only used postgres on debian, redhat and osx (both fink and darwinports), so i can't say anything about ubuntu.

You've already decided that you are going to find everything you can to hate about postgres, so it's not surprising you are doing so.

Submitted by nk on Sun, 2008-02-03 23:32.

... and yet I have at least written down something which worked for me. Feel free to point out any other quick start guides for Drupal. I have also figured out how to work bytea columns with pdo_pgsql... so my scorn at postgresql does not stop me working on it.

Submitted by GeoffGlasson on Mon, 2008-02-04 01:46.

I'm glad to see that you have gotten PostgreSQL up and running, although it seems you may have gone about it the hard way. (FYI - I use PostgreSQL and Drupal 5 on my FreeBSD system so my mileage is different from yours).

Like the other poster, I have not had to edit pg_hba.conf to access PostgreSQL from localhost. The PostgreSQL installation instructions on the Drupal website should work once you've got PostgreSQL up and running. You shouldn't need to use psql at all.

I have successfully run Drupal on PostgreSQL as the pgsql user (similar to the mysql root user I think), and as a user created specifically for Drupal.

I'm not an expert on PostgreSQL, but you're welcome to contact me if I can be of assistance.

BTW: I've also managed to get Drupal 5 and PostgreSQL running under Windows (not Cygwin) following the same process as under FreeBSD. I would imagine that the process under any of the Linux systems would be similar too.

Submitted by on Mon, 2008-02-04 02:48.

In case of Debian, I have written a mini-HOWTO once before. Hope this may help the other as a Debian-base quick start ;-)

Debian etch + PostgreSQL 8.1 + phppgadmin mini-HOWTO