[wp-hackers] PostgreSQL port status?
usleepless at gmail.com
usleepless at gmail.com
Fri Sep 28 09:07:23 GMT 2007
On 9/28/07, Computer Guru <computerguru at neosmart.net> wrote:
> It was too much work to keep it working after every update from the official
> WP repo, it kept breaking big-time.
>
> If anyone is interested in a PGSQL "port", we discussed this several on here
> and came to the conclusion that the most viable thing is a plugin that
> intercepts any calls to the database and uses some regex/mapping voodoo to
> convert MySQL commands to PostgreSQL commands.
i have code that does the "voodoo" for 2.3 and the previous 2.x
version. i have no code to migrate from mysql to pgsql though, so you
will have to start with a blank.
my module is for a PHP without mysql-support and it implements all
mysql_* calls. but if anyone wants to take up the task to create a
plugin, i am glad to hand it over.
> > On Sep 03, 2007, at 22:09, Matt Mullenweg wrote:
> > > Q: Why does WordPress only support MySQL? What about DB abstraction?
> > >
> > >
> > > While in theory supporting more databases is better than supporting
> > > one, in practice we've found focusing on MySQL has a number of
> > > benefits.
i call BS. as is explained below, you found it in "theory". it was
never tried ( in practice ).
> > > First, introducing support for databases other than MySQL would
> > > increase the testing load for all development quite a bit, as
> > > already the combinations of PHP versions, web servers like Apache,
> > > Lighttpd, and IIS, and Windows vs Linux cause a number of issues,
> > > multiplying that by an arbitrary number of database platforms is
> > > daunting.
> > >
> > > Early on in WordPress' history when DB abstraction was seriously
> > > considered we noticed packages like AdoDB were bigger than
> > > WordPress itself, which seemed like a lot of weight for little gain.
> > >
> > > DB independence also requires far more than just dropping in a DB
> > > abstraction class, as basic assumptions WP makes about things like
> > > primary keys, indicies, auto incrementing fields, LIMITs, and more
> > > vary more from DB to DB than a class could support without serious
> > > code changes.
if a litte regex-voodoo can do the trick, i wouldn't call it "serious
code changes". actually most query-rewrites for pgsql would still work
for mysql as well.
furthermore, if the schema can be overhauled like it was in 2.3 i
don't see why it can't be overhauled for a litte portability.
while we are at it:
is there anyone who can explain why there are about 6 integer types in
the schema?
- bigint(10)
- bigint(20)
- tinyint(1)
- int(11)
- int(4)
- unsigned
regards,
usleep
> > > Finally, MySQL is ubiquitous and has shown to be fast enough and
> > > scalable enough for the highest traffic loads, so supporting other
> > > DBs would not improve the WordPress experience or our popularity
> > > much. As a feature request it comes of fairly infrequently.
> > >
> > > All that said, every query in WordPress goes through a class called
> > > wpdb and that class can be replaced with your own by putting a
> > > db.php file in wp-content. So far this has been used for mysqli
> > > support and an advanced enterprise DB class called HyperDB, but in
> > > theory you could use that, and some wicked regular expressions, to
> > > add support for a MySQL-like database without any core code
> > > modifications.
> > -----
> >
> >
> > Stephane
> >
> >
> >
> >
> >
> > On Sep 27, 2007, at 23:02, Anthony Yarusso wrote:
> >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > I remember a little while ago there was some talk about a PostgreSQL
> > > version of Wordpress. How is that coming along, and is there a web
> > > site or separate mailing list where I could follow it more closely?
More information about the wp-hackers
mailing list