Postgres

1089688912000

I have been having an on again off again affair with postgreSQL for quite some time. My first run in with postgres was in the year 2001. At the time I was just interested in seeing what it had to offer and how it behaved like many others I was under the wrong impression that it's mostly used in academic work.

If you have been using mySQL you are no doubt as distressed as I am about the license changes and backtracking by mysql ab. Now they are saying mysql client library can be bundled with PHP again but who knows what they may say tommorow? All in all it's time for the love affair that PHP developers have with mysql to end.

As with thousands of others mysql became my preffered database because it is so easy to install and use. The fact that the mysql documentation is readable certainly helped. The very fact that postgres is a much superior database means that there is a much steeper learning curve involved.

While mysql can be installed easily even by developers with limited knowledge of system administration the same cannot be said about postgres. Similarly the first few steps, creating databases, adding tables seems a wee bit more difficult with postgres when compared to mysql.

My gripe today though is about retrieving meta data using the JDBC driver. If you are using the psql command line client you can retrieve information about a table with the d tablename command. Unfortunately that command cannot be used from the JDBC driver and describe tablename syntax is not supported in either.

Curiosly the pgsql api in PHP has a function that can retrieve meta data for you. So how come it's supported in one but not in the other?

comments powered by Disqus