Hi,
Sorry for the delay in response but I was on vacation all week.
You should not use the legacy scripts and you should not run any scripts manually except maybe the plpgsql.sql script which installs the pl/pgSQL language. The legacy scripts only exist for upgrading very old mojoportal installations. I thought I had a readme file in there telling this but I see its not there and will add it.
If you create your db and you have the pl/pgSQL language installed, all you need to do is set your connection string and visit siteroot/Setup/Default.aspx and it will run all the needed scripts automatically.
I have only used postgresql on linux myself so I can't answer whether there are any windows version issues.
If you think there is a problem with a script, you are going to have to be more specific and tell me which script and which part of the script you think is not right. It works fine for me. If you are getting some error about casting you need to tell me exactly the error and where it occurs.
Hope it helps,
Joe