helo,
I just downloaded ubercart from project/ubercart having preloaded and installed every prequired module. Module Quotes [Shipping] has _oid_ field which conflict with built-in oid field in postgresql [8.0]. Changed it to 'roid' along with every script that referred to it. Actually do not now if it on purpose and one should 'deactivate' 'auto-oid' fields (think it is not possible, but tehn again)
Beste regards

Comments

Island Usurper’s picture

Unfortunately, there are more tables than just the shipping quotes that use "oid" for a column name. From the Postgres documentation, it looks like I can specify WITHOUT OIDS on those tables. Or each Postgres user can specify default_with_oids to false in the runtime config: http://www.postgresql.org/docs/8.0/static/runtime-config.html#GUC-DEFAUL.... It's also interesting that this value is default to false in PostgreSQL 8.1, so that might be why I haven't heard about this before.

I also need to figure out if putting WITHOUT OIDS will break 8.1.

Island Usurper’s picture

Assigned: Unassigned » Island Usurper
Status: Active » Fixed

Seems like it doesn't, so I've implemented WITHOUT OIDS on those tables. On reflection, I should probably change the quote table to use order_id to be consistent with the rest of Übercart. But I'd be more likely to mess that up if I fixed it. :(

rmendonca’s picture

Thanks for the speedy inputs and prompt suggestions. I might as well point out 2 things on my release:
- I had to change country cif files for it to work on postgresql:
So, instead of

  db_query("INSERT INTO {uc_zones} VALUES "
          ."(%d, 840, 'AL', 'Alabama'),"
          ."(%d, 840, 'AK', 'Alaska'),"

[ ... ]
I set:

$ids=db_next_id('{uc_zones}_zone_id');
db_query("INSERT INTO {uc_zones} VALUES (%d, 840, 'AL', 'Alabama');", $ids);
$ids+=1;
db_query("INSERT INTO {uc_zones} VALUES (%d, 840, 'AK', 'Alaska');", $ids);
$ids+=1;

[ ... ]

It looks postgresql can't handle multiple INSERTS in one statement. If its a typing saving thing, put codes and names in 2D array and loop-it.

Second thing, if I'm allowed, the db_next_id('{uc_zones}_zone_id'); didn't actually work when I tried a second language - I actually dropped default canada_install() a installed a brand new portugal_351_1.cif having $ids = a_number_above_200. I would like to contribute but can't seem to figure out any standard concerning district codes.

Well, another thing: Why bother with IDs at all? Both MySQL and Postgresql have auto-increment/serial field/attributes you can set to integer primary keys. Loose it, I say.

Best regards, and congratulations on an impressive work

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

rszrama’s picture

Version: 5.x-1.0-beta5 » 6.x-2.x-dev
Status: Closed (fixed) » Needs work
Island Usurper’s picture

Version: 6.x-2.x-dev » 5.x-1.0-beta5
Status: Needs work » Closed (fixed)

We'll handle the multiple inserts problem in #509312: PostgreSQL doesn't do multiple-row INSERTs until Drupal 7