API improvemtns suggested by Robert Haas