Simon Buckle's Weblog

Random thoughts for random people

Archive for December, 2005

Logging SQL queries

Comments

A note to myself about how to log SQL queries when using PostgreSQL. In postgresql.conf set the following parameters:

log_statement = true
syslog = 2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

The database will need to be restarted in order for the changes to have any effect. To view the SQL queries that are being executed, log in as root and issue the following command:

[root@localhost ] tail -f /var/log/messages

Once you have finished the analysis don’t forget to turn off the SQL logging.

The reason I needed to do this was that Postfix was rejecting email for a virtual domain set up on my server. The mapping tables were in the database so I needed to see what SQL query Postfix was sending to PostgreSQL to try and figure out why the lookup was failing. As it happens I figured out the problem, but that’s a post for another day.

Written by admin

December 20th, 2005 at 2:20 pm

Posted in Tech Tips

Music Google style

Comments

Now Google is doing music. For example, type “Madonna” or “Daddy Yankee” into Google and you back a link to more information about the artist.

What’s really cool is that if you browse an album Google provides links to sites with the lyrics of the songs. I wonder how long it will be before Google starts negotiating with music companies to start selling music too?

Written by admin

December 16th, 2005 at 11:36 am

Posted in Uncategorized

Microsoft works with Mozilla

Comments

Microsoft’s RSS team has just announced that they have adopted the icon Firefox uses to represent the presence of an RSS feed. It will be incorporated into IE7. According to the announcement Microsoft “worked with the Mozilla team to encourage consistency between browsers”. Yet more kudos to Microsoft. Perhaps the sleeping giant really has woken up.

Written by admin

December 14th, 2005 at 10:27 pm

Posted in Uncategorized

Imagine

Comments

25 years ago today John Lennon was shot dead outside of his apartment in New York.

Written by admin

December 8th, 2005 at 12:10 am

Posted in Uncategorized