Has Schema 7.x-1.x even been tested on PostgreSQL? I just did a test install on a brand-new PostgreSQL-backed Drupal site. Going to admin/report/status or admin/structure/schema results in this error:

PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT * FROM information_schema.COLUMNS WHERE table_catalog=:database AND table_schema=current_schema()ORDER BY table_name, ordinal_position; Array ( [:database] => test7 [:table] => ) in schema_compare_schemas() (line 220 of /home/test7/public_html/sites/all/modules/schema/schema.module).

I found the Schema module very handy on Drupal 6, but this is not encouraging.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ben Coleman’s picture

Ok, I've got the above error figured out. The problem is that the SELECT has only 1 bound variable, while 2 tokens are provided. The attached patch fixes that.

There are still problems, though. Though this patch fixes the above error message, going to admin/report/status or admin/structure/schema now results in an HTTP Error 500 and a blank page.

nohup’s picture

Ben,

Thanks for your patch. I have updated it to drupal 7 db api.

Patch attached.

Ben Coleman’s picture

Status: Active » Reviewed & tested by the community

I can confirm that patch 2 gets rid of the HTTP Error 500 problem. With this patch, admin/structure/schema and admin/report/status at least produce output. There are still problems (and I'll open other issues on them), but Schema 7 no longer fails utterly on PostgreSQL.

lquessenberry’s picture

I can't get either one to patch at all.

lquessenberry’s picture

I have tried several times to patch this with no luck in patching. I have tried reading all the documentation on patching modules with no avail. When I try to run the patches I get hunk errors or file not found errors. Is there a way someone could commit this to a dev module or just give me a patched version of the module. I am having no luck successfully patching at all.

*UPDATE* I was patching the wrong file. So Sorry! :(

colan’s picture

Status: Reviewed & tested by the community » Fixed

Committed in d381508.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

hometoy’s picture

Maybe I am dumb, but when it asks "File to patch" what am I supposed to answer it?