[drupal-devel] 4.6 + PostgreSQL

Marc Poris marc at cointoss.com
Thu Apr 7 14:39:30 UTC 2005


Hi,

For the last couple days I have been using 4.6 with PostgreSQL on 
windows with Apache 2 and PHP5.  I've gotten a bunch of pg_query() 
errors and am wondering if this stuff is supposed to be working yet with 
PostgreSQL.

Some of the errors:

1. Attempting to add a new role:

   INSERT INTO role (name) VALUES ('superduper') in 
C:\...\includes\database.pgsql.inc on line 62.
   pg_query() [function.pg-query 
<http://www.footballfantasywizard.com/function.pg-query>]: Query failed: 
ERROR: duplicate key violates unique constraint "role_pkey" in 
C:\...\includes\database.pgsql.inc on line 45.

I fixed this by incrementing the role_rid_seq Current Value, but looking 
at the code in user.module, it seems that we would want to change the 
following (add a call to db_next_id):

      db_query("INSERT INTO {role} (name) VALUES ('%s')", $edit['name']);

2. Under logs, top users (and top pages) this error happens:

   SELECT COUNT(a.uid) AS hits, a.uid, u.name FROM accesslog a LEFT JOIN 
users u ON a.uid = u.uid GROUP BY a.uid ORDER BY hits DESC LIMIT 30 
OFFSET 0 in C:\...\includes\database.pgsql.inc on line 63.
   pg_query() [function.pg-query 
<http://www.footballfantasywizard.com/function.pg-query>]: Query failed: 
ERROR: column "u.name" must appear in the GROUP BY clause...

3. First time I went to the forums (can't reproduce this one, but will 
do so on a clean install):

   INSERT INTO vocabulary (name, description, help, multiple, required, 
hierarchy, relations, weight, module, vid) VALUES ('Forums', '', '', 0, 
1, 1, 0, '', 'forum', '1')
   pg_query() [function.pg-query 
<http://www.footballfantasywizard.com/function.pg-query>]: Query failed: 
ERROR: invalid input syntax for integer: ""

---

I guess my questions are:

1. Is there a main contact for Drupal/PostgreSQL issues (I emailed James 
Arthur whose name is at the top of database.pgsql and he gave me some 
great starting points but said he's been out of the loop for a number of 
years)?

2. When 4.6 is released, what does that mean as far as PostgreSQL stability?

And I'm volunteering to help out -- I've got some time on my hands, but 
I am not a PostgreSQL expert.  Doesn't look like one is really needed, 
but there appears to be a need for someone to be banging on it.

Please feel free to flame away.  Hope I haven't put this out in the 
wrong venue.

Marc








More information about the drupal-devel mailing list