If I Was in Charge of Postgres
Postgres has always been sort of the poor step child to MySQL. A technically excellent product that never has been able to quite catch up. Now I like MySQL a lot but the recent php licensing snafu (and emphasize the afu) presents Postgres with a huge opportunity. What I'd do is simple:
Make Postgres compatible with the mysql_* functions in PHP.
Now for those who aren't php folks, let me explain. The PHP language has a series of functions named mysql_* which do the basic database operations. They are (I suspect) basically native calls to the built-in MySQL function calls and they're both easy to use and rippingly fast. Now PHP also offers a database independent API, Pear (think Perl's DBI) but I don't think that's the answer. If I had to guess most of us use the mysql_* functions just because they're both fast and easy. Its also non-trivial (IMHO) to move your code from the mysql_* functions to Pear. I've looked at it and basically walked away from it.
Yes there are a set of Postgres functions in php too. But switching over would require rewriting code. Lots of code. So what I would do if I was in charge of Postgres would be too:
- Add a php.ini function which mapped all mysql_* calls to use Postgres
- Make Postgres accept the common MySQL things that cause problems in Postgres (auto-incrementing keys I'd suspect)
- Make it easy to make the change
Let's face facts here -- the php community is bloody well huge. And we bring a lot of users. So this is a potentially huge opportunity for Postgres.
Note: I know I'm going to take some heat for this post. It isn't the right way to do tihngs or this is just plain a hack or whatever. I'm looking at this not from the pure computer science perspective but from the user's perspective who has to deal with re-engineering his or her application.
PHP / MySQL Licensing Links
When:
11:51:06 AM |
Permalink: |
|
IM Me About This
|