Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I installed Ubercart and got the following:
warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "," at character 91 in /var/www/sites/cart/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO uc_zones (zone_country_id, zone_code, zone_name) VALUES (840, 'AL', 'Alabama'),(840, 'AK', 'Alaska'),(840, 'AS', 'American Samoa'),(840, 'AZ', 'Arizona'),(840, 'AR', 'Arkansas'),(840, 'AF', 'Armed Forces Africa'),(840, 'AA', 'Armed Forces Americas'),(840, 'AC', 'Armed Forces Canada'),(840, 'AE', 'Armed Forces Europe'),(840, 'AM', 'Armed Forces Middle East'),(840, 'AP', 'Armed Forces Pacific'),(840, 'CA', 'California'),(840, 'CO', 'Colorado'),(840, 'CT', 'Connecticut'),(840, 'DE', 'Delaware'),(840, 'DC', 'District of Columbia'),(840, 'FM', 'Federated States Of Micronesia'),(840, 'FL', 'Florida'),(840, 'GA', 'Georgia'),(840, 'GU', 'Guam'),(840, 'HI', 'Hawaii'),(840, 'ID', 'Idaho'),(840, 'IL', 'Illinois'),(840, 'IN', 'Indiana'),(840, 'IA', 'Iowa'),(840, 'KS', 'Kansas'),(840, 'KY', 'Kentucky'),(840, 'LA', 'Louisiana'),(840, 'ME', 'Maine'),(840, 'MH', 'Marshall Islands'),(840, 'MD', 'Maryland'),(840, 'MA', 'Massachusetts'),(840, 'MI', 'Michigan'),(840, 'MN', 'Minnesota'),(840, 'MS', 'Mississippi'),(840, 'MO', 'Missouri'),(840, 'MT', 'Montana'),(840, 'NE', 'Nebraska'),(840, 'NV', 'Nevada'),(840, 'NH', 'New Hampshire'),(840, 'NJ', 'New Jersey'),(840, 'NM', 'New Mexico'),(840, 'NY', 'New York'),(840, 'NC', 'North Carolina'),(840, 'ND', 'North Dakota'),(840, 'MP', 'Northern Mariana Islands'),(840, 'OH', 'Ohio'),(840, 'OK', 'Oklahoma'),(840, 'OR', 'Oregon'),(840, 'PW', 'Palau'),(840, 'PA', 'Pennsylvania'),(840, 'PR', 'Puerto Rico'),(840, 'RI', 'Rhode Island'),(840, 'SC', 'South Carolina'),(840, 'SD', 'South Dakota'),(840, 'TN', 'Tennessee'),(840, 'TX', 'Texas'),(840, 'UT', 'Utah'),(840, 'VT', 'Vermont'),(840, 'VI', 'Virgin Islands'),(840, 'VA', 'Virginia'),(840, 'WA', 'Washington'),(840, 'WV', 'West Virginia'),(840, 'WI', 'Wisconsin'),(840, 'WY', 'Wyoming') in /var/www/sites/cart/sites/all/modules/ubercart/uc_store/countries/united_states_840_1.cif on line 74.
warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "," at character 91 in /var/www/sites/cart/includes/database.pgsql.inc on line 139.
user warning: query: INSERT INTO uc_zones (zone_country_id, zone_code, zone_name) VALUES (124, 'AB', 'Alberta'),(124, 'BC', 'British Columbia'),(124, 'MB', 'Manitoba'),(124, 'NF', 'Newfoundland'),(124, 'NB', 'New Brunswick'),(124, 'NS', 'Nova Scotia'),(124, 'NT', 'Northwest Territories'),(124, 'NU', 'Nunavut'),(124, 'ON', 'Ontario'),(124, 'PE', 'Prince Edward Island'),(124, 'QC', 'Quebec'),(124, 'SK', 'Saskatchewan'),(124, 'YT', 'Yukon Territory') in /var/www/sites/cart/sites/all/modules/ubercart/uc_store/countries/canada_124_1.cif on line 22.
Comment | File | Size | Author |
---|---|---|---|
#11 | 509312_pg_countries.patch | 200.86 KB | Island Usurper |
#9 | 509312_200907111646-0400.patch | 214.89 KB | sammys |
#7 | insert_zones_ca_us.patch | 7.64 KB | Island Usurper |
Comments
Comment #1
TR CreditAttribution: TR commentedI thought this had been fixed long ago, but I guess not. Here's the old issue, which explains what the problem is: http://drupal.org/node/224070#comment-738719
Comment #2
rszrama CreditAttribution: rszrama commentedReopened the more descriptive issue and closing this'n.
Comment #3
Island Usurper CreditAttribution: Island Usurper commentedNope, that issue only had this problem tacked onto it after the first problem was fixed. Then it was closed automatically and everyone (including the original poster, apparently) forgot about it.
So let's get this fixed here.
Comment #4
Island Usurper CreditAttribution: Island Usurper commentedFor clarity.
Comment #5
stodge CreditAttribution: stodge commentedMaybe my version of PostgreSQL (8.1.11-1.el5_1.1) doesn't support multiple row inserts, but it looks like recent versions do. So your changed title may not be too accurate.
Comment #6
Island Usurper CreditAttribution: Island Usurper commentedFair enough, but Drupal 6 only requires PostgreSQL 7.4 or higher, most of which don't support multiple row inserts.
Comment #7
Island Usurper CreditAttribution: Island Usurper commentedUgh, that's a lot of files. Here's Canada and the United States, since those are imported automatically. I tried writing a sed script to handle the rest, but I couldn't get it to work right. It's getting so that I can do each file manually faster than figuring it out.
But I won't right now. Here's the changes to these two countries. I'll try to get some more done as I find time and motivation, but help would be appreciated.
Comment #8
sammys CreditAttribution: sammys commentedI'll see if I can get sed to do the magic.
Comment #9
sammys CreditAttribution: sammys commentedSed did the magic. :) Patch attached.
Comment #10
sammys CreditAttribution: sammys commentedSince it's a stopper for anyone using PostgreSQL marking as critical.
Comment #11
Island Usurper CreditAttribution: Island Usurper commentedThe patch didn't apply to Bermuda or Nigeria, but now I can't find a difference between the diffs after I manually changed them.
I also fixed Australia and Austria because the country IDs would be interpreted as octal numbers, which would cause some great confusion.
Thanks, Sammy, for knowing sed better than me. Committed with those changes.