Applied patch from Luis Ressel: labeling scheme for postgres