[wp-hackers] port of 2.1 to postgresql

Robert Deaton false.hopes at gmail.com
Thu Mar 15 19:46:18 GMT 2007


On 3/15/07, Computer Guru <computerguru at neosmart.net> wrote:
> To be fair: EzSQL does a GREAT job of database abstraction and works just
> fine with both MySQL & pgSQL, along with a number of other RDBMS.

EzSQL is not, in any way, and probably will never be, a database
abstraction layer. I don't know where you came up with this. A query
passed to ezsql is in no way edited or transformed to handle any
differences between databases. Ezsql is just a class that makes the
names for doing actions unique across databases. Nothing more.

> I've set up many db-independent scripts with EzSQL -- including pagination
> functions/features too that work just fine with all RDBMS supported by
> EzSQL.

If your queries happened to work on multiple database engines,
congrats. In the real world, this doesn't always happen. In WordPress
and its plugins, this will not happen.

> The reason why WP doesn't use PEAR or AdoDB is because of overhead and
> performance - but seeing as WP uses EzSQL for MySQL access *anyway*, I don't
> see that the usual reply "it's overhead" would apply to using
> EzSQL-supported RDBMS with WP.

There is little overhead, because there is no abstraction.

So, to sum up, in case it wasn't blindingly clear. Ezsql is not
abstraction. Queries still must be rewritten. Plugins would have to be
written with support for multiple databases in mind. The overhead
comes in somewhere, whether in man-hours or in day-to-day performance.

-- 
--Robert Deaton
http://lushlab.com


More information about the wp-hackers mailing list