some consistency adjustments for working with old postgres (8.4)