Fix some errors in PgSQL XAssets by changing some data types. Also make sql query syntax more in line with the PgSQL AssetData implementation.