sql import errors on PostgreSQL 8.1 [message #381] |
Wed, 08 November 2006 11:07 ![Go to next message Go to next message](/theme/default/images/down.png) |
mitjok
Messages: 6 Registered: June 2006
|
Junior Member |
|
|
Upgrading from version 1.16 to 1.17 on PostgreSQL 8.1
While importing radicore/menu/sql/menu.menu_export.sql, as stated in in release announcement, have the following errors:
1.
ERROR: syntax error at or near "," at character 234
LINE 1: ...05 17:20:23', 'AJM', '2005-07-14 17:02:12', 'AJM'),('SYSTEM'...
^
Please correct me if I'm wrong, but multiple-row VALUES clauses will be introduced in PostgreSQL 8.2, which currently is in the development.
2.
psql:/menu.menu_export.sql:195: ERROR: duplicate key violates unique constraint "mnu_subsystem_pkey"
I manually took difference of the menu.menu_export.sql of ver. 1.16 and 1.17 and imported in my project.
The same problem I expect with /dict/sql/dict.menu_export.sql
Is there any other way, as to make these changes manually?
Thanks in advance!
|
|
|
Re: sql import errors on PostgreSQL 8.1 [message #383 is a reply to message #381] |
Wed, 08 November 2006 11:49 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
That's the problem with those PostgreSQL developers - they like to crow about how MySQL is a "toy database" that does not follow the SQL standards, yet they fail to provide a working implementation of it themselves. What a bunch of oiks! It's small wonder that MySQL is much more popular.
As PostgreSQL does not support REPLACE INTO you will have to use the subsystem ERASE feature to delete the current database entries before using the scripts to INSERT.
Unfortunately you will have to edit the files manually to insert each record one at a time.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|