SCM

Forum: bugs

Monitor Forum | Start New Thread Start New Thread
RE: Field contents interpretted as a time sta [ reply ]
By: Niccolo Rigacci on 2007-11-24 14:55
[forum:1002865]
I tried the 1.4 revisoin: the problem is fixed here. Thanks to you, more happy hacking to all.

RE: Field contents interpretted as a time sta [ reply ]
By: Phillip Odam on 2007-11-24 04:41
[forum:1002861]
Brilliant work! Though I have to say none of these issues had much impact when I've used the script. Simply meant there were a couple of lines of SQL that needed slight adjusting.

I'll see what I can come up with for the word "double" replacing the field names. I would simply release the actual db dump but it isn't mine. And (from what I recall) the table def the script incorrectly converted doesn't occur when in isolation.

RE: Field contents interpretted as a time sta [ reply ]
By: Jose Duarte on 2007-11-16 11:02
[forum:1002843]
I commited a fix (cvs rev 1.4) for the fields being converted to timestamps. There was a regex for converting date-like number strings to timestamps, I'm not sure what was it for so I got rid of it. Hopefully it shouldn't cause trouble.

Re issue with doubles I can't see that happening with latest revision. Can you make sure it is still true for you with latest cvs? If it still fail can you post also snippet of SQL causing it?

Contributions to the code are more than welcome of course :-) With the latest modifications the code is much more readable so hope you can find your way around it.

Beware that we haven't updated the "Files" downloads recently, that's why we advise for the moment to take the script from CVS ("SCM" link), anyway it is only just one file so it's easy to grab it from CVS even directly through the web interface.


RE: Field contents interpretted as a time sta [ reply ]
By: Phillip Odam on 2007-11-16 09:43
[forum:1002841]
I have to admit I didn't get the latest version from the CVS. I just got the version available from the summary page.

I've just now tried out revision 1.3 dated Mon Aug 13 08:18:07 2007 and I'm still getting both errors I've reported. These being the one reported here in this thread and "Close parenthesis in field causing problem". I've also noticed the issue with the field names coming out as double instead of their appropriate name.

I think I might take some time out and familiarise myself with this script and see if I'm able to recommend some changes.

RE: Field contents interpretted as a time sta [ reply ]
By: Niccolo Rigacci on 2007-10-30 12:30
[forum:1002796]
Also this value is not converted well:

INSERT INTO graph_tree_items VALUES (7,1,0,0,'',1,'001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',1,1);

becomes:

INSERT INTO "graph_tree_items" VALUES (7,1,0,0,E'',1,E'00'1000-00-00 00:00:00'00000000000000000000000000000000000000000000000000000000000000000000000000',1,1);

Field contents interpretted as a time stamp [ reply ]
By: Phillip Odam on 2007-09-03 11:57
[forum:1002620]
The following MySQL

INSERT INTO table_name VALUES (1, '20070712113615');

using the command

./mysql2pgsql.perl --enc_in unicode --enc_out unicode mysql.sql postgres.sql

Generates the following SQL

INSERT INTO "table_name" VALUES (1, E''2007-07-12 11:36:15'');

Have I got something wrong with my SQL or the arguments to the script?

Powered By FusionForge