Won't that mean that enum variables don't complete to default anymore?
no, it does
#define Query_for_enum \ " SELECT name FROM ( "\ " SELECT unnest(enumvals) AS name "\ " FROM pg_catalog.pg_settings "\ " WHERE pg_catalog.lower(name)=pg_catalog.lower('%s') "\ " UNION SELECT 'DEFAULT' ) ss "\ **************** " WHERE pg_catalog.substring(name,1,%%d)='%%s'"