Hi there,
I wanted to get trunk going w/ postgres, and it seems there's quite a few discrepancies between the postgres 1.3->1.4 script and the MySQL version.
It's bad enough right now (-revision 994) that A2B won't work on PG.
So I spent the day going over it line by line to make sure there as equivalent as possible and here's the patch.
I also normalized the formating a little, and if you compare them side by side (24" monitors are nice for that
) all the pertinant bits match up line for line.
A note, based on the postgres manual
here there's little point of using CHARACTER(n), so when the MYSQL version does, I switched them to CHARACTER VARYING(n).
NUMERIC and DECIMAL are equivalent, so I switched all to DECIMAL where MySQL uses them.
I've some concerns about each of the schemes:
They are added as comments, especially regarding errors I've fixed but which are still broken in the MySQL version. Search 'XXX'
The switch to encrypted passwords doesn't update existing passwords
The encrypted pw hash in the mysql script isn't even root's default password ('mycode') and admin's isn't set. That can be seriously confusing when you can't login!
A lot of money related columns are using floats, which is probably not a good idea. The last place you want ill-defined behaviour is when dealing with money, no? See postgress doc 8.1.3
The only reason I can think of to use floats is if the database itself is actually doing calculations with them.
Anyways, I hope that helps out out a bit. Feel free to use whatever you'd like to include from the patch. (labeled .txt as .patch doesn't seem to be allowed)