RE: PostgreSQL compatibility fixes

pokryfka <[email protected]> 25 Aug 2003 15:28:43 -0000
Newsgroups gmane.comp.web.oscommerce.devel
Message-ID <c75967e4b41c4e33e9a7df5007c1a3ab@osCommerce-Forums>
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=219360#219360
----------------------------------------------------------------

[quote="Cryp2Nite"]I have a to-be-finished PEAR::DB version here.
The catalog is almost completely posted, it's just the administration that I haven't done so far.

PS: If you are using pgsql, I found out that adding some extra indexes to the database can speed queries up considerably.[/quote]

there're are also functional indexes, generally pgsql is great

as for the sql fixes - they're very minor so it's not a big deal 
some incorrect queries that work on mySQL (like the one with aggregate functions)
also i was suprised that osc compares an integer with a string '2{4}3{5}'
and according to mysql it's equal 2 !!!

how do You implement mysql's last_insert_id ?

i think osc needs abstrac db layer but it's up to the project leader when and how.

meanwhile it would be nice if they change some db related issues.
this would not break osc and would make the future shift easier.

examples is EXTRACT(DATE FROM date) instead of DATE(date) which is ANSI compilant and supported by both pg anf mysql.
also LIMIT OFFSET clause and some others

one more think i disliked, and didnt change as for now at least, that insome cases they insert '0' insetead of NULL in foreign key fields

i know i doeasnt make a difference for mysql which doesnt support it anyway but id does on databases which can garantee data consitency themself