Skip to main content
xenoveritas.org

Main navigation

  • Categories
  • Home
  • Links
  • Name Generator
  • Scramble
User account menu
  • Log in

Breadcrumb

  1. Home

Using Drupal with PostgreSQL

By Xenoveritas, 25 March, 2006
Topics
Web
  • Add new comment

I found a couple of "gotchas" with installing Drupal using a PostgreSQL backend. Otherwise it's fairly straight forward.

The first problem you're likely to encounter is that your new database won't have the "plpgsql" language defined, so the creation script will fail. You simply need to "CREATE LANGUAGE 'plpgsql';" or create the language through your admin tool before running the database.pgsql script. You must create the language using a superuser account, which brings us to Likely Problem 2.

Most people will create a "normal" Drupal user account to access their Drupal database. This user can't CREATE LANGUAGE like superusers can. So you might be tempted to run the creation script via a superuser account (like postgres).

Don't. CREATE TABLE commands assign ownership to the user that created them, and Drupal creates 54 tables. This means that your Drupal user will be denied access by default to the Drupal tables, since it's not the owner.

So instead, log in as a superuser. Create the database, the Drupal user, and the new language. Log out, and then back in as your Drupal user, and then run the creation script. You'll save yourself a lot of hastle, wondering why your Drupal user can't access tables in a database it owns.

Current Games

I'm currently playing:

  • Final Fantasy XIV: Endwalker

I intend to maybe get around to finishing:

  • Literally anything else

Video Games Section

Thought for the Moment

I never have thoughts any more.

Old Thoughts

Has the LHC Destroyed the Earth?

  • Create new account
  • Reset your password
RSS feed
Powered by Drupal