CREATE TEMP TABLE language_enc (name CHAR(2) NOT NULL, lang language NOT NULL PRIMARY KEY);
INSERT INTO language_enc VALUES('aa', 'aa');
INSERT INTO language_enc VALUES('ab', 'ab');
INSERT INTO language_enc VALUES('ae', 'ae');
INSERT INTO language_enc VALUES('af', 'af');
INSERT INTO language_enc VALUES('ak', 'ak');
INSERT INTO language_enc VALUES('am', 'am');
INSERT INTO language_enc VALUES('an', 'an');
INSERT INTO language_enc VALUES('ar', 'ar');
INSERT INTO language_enc VALUES('as', 'as');
INSERT INTO language_enc VALUES('av', 'av');
INSERT INTO language_enc VALUES('ay', 'ay');
INSERT INTO language_enc VALUES('az', 'az');
INSERT INTO language_enc VALUES('ba', 'ba');
INSERT INTO language_enc VALUES('be', 'be');
INSERT INTO language_enc VALUES('bg', 'bg');
INSERT INTO language_enc VALUES('bh', 'bh');
INSERT INTO language_enc VALUES('bi', 'bi');
INSERT INTO language_enc VALUES('bm', 'bm');
INSERT INTO language_enc VALUES('bn', 'bn');
INSERT INTO language_enc VALUES('bo', 'bo');
INSERT INTO language_enc VALUES('br', 'br');
INSERT INTO language_enc VALUES('bs', 'bs');
INSERT INTO language_enc VALUES('ca', 'ca');
INSERT INTO language_enc VALUES('ce', 'ce');
INSERT INTO language_enc VALUES('ch', 'ch');
INSERT INTO language_enc VALUES('co', 'co');
INSERT INTO language_enc VALUES('cr', 'cr');
INSERT INTO language_enc VALUES('cs', 'cs');
INSERT INTO language_enc VALUES('cu', 'cu');
INSERT INTO language_enc VALUES('cv', 'cv');
INSERT INTO language_enc VALUES('cy', 'cy');
INSERT INTO language_enc VALUES('da', 'da');
INSERT INTO language_enc VALUES('de', 'de');
INSERT INTO language_enc VALUES('dv', 'dv');
INSERT INTO language_enc VALUES('dz', 'dz');
INSERT INTO language_enc VALUES('ee', 'ee');
INSERT INTO language_enc VALUES('el', 'el');
INSERT INTO language_enc VALUES('en', 'en');
INSERT INTO language_enc VALUES('eo', 'eo');
INSERT INTO language_enc VALUES('es', 'es');
INSERT INTO language_enc VALUES('et', 'et');
INSERT INTO language_enc VALUES('eu', 'eu');
INSERT INTO language_enc VALUES('fa', 'fa');
INSERT INTO language_enc VALUES('ff', 'ff');
INSERT INTO language_enc VALUES('fi', 'fi');
INSERT INTO language_enc VALUES('fj', 'fj');
INSERT INTO language_enc VALUES('fo', 'fo');
INSERT INTO language_enc VALUES('fr', 'fr');
INSERT INTO language_enc VALUES('fy', 'fy');
INSERT INTO language_enc VALUES('ga', 'ga');
INSERT INTO language_enc VALUES('gd', 'gd');
INSERT INTO language_enc VALUES('gl', 'gl');
INSERT INTO language_enc VALUES('gn', 'gn');
INSERT INTO language_enc VALUES('gu', 'gu');
INSERT INTO language_enc VALUES('gv', 'gv');
INSERT INTO language_enc VALUES('ha', 'ha');
INSERT INTO language_enc VALUES('he', 'he');
INSERT INTO language_enc VALUES('hi', 'hi');
INSERT INTO language_enc VALUES('ho', 'ho');
INSERT INTO language_enc VALUES('hr', 'hr');
INSERT INTO language_enc VALUES('ht', 'ht');
INSERT INTO language_enc VALUES('hu', 'hu');
INSERT INTO language_enc VALUES('hy', 'hy');
INSERT INTO language_enc VALUES('hz', 'hz');
INSERT INTO language_enc VALUES('ia', 'ia');
INSERT INTO language_enc VALUES('id', 'id');
INSERT INTO language_enc VALUES('ie', 'ie');
INSERT INTO language_enc VALUES('ig', 'ig');
INSERT INTO language_enc VALUES('ii', 'ii');
INSERT INTO language_enc VALUES('ik', 'ik');
INSERT INTO language_enc VALUES('io', 'io');
INSERT INTO language_enc VALUES('is', 'is');
INSERT INTO language_enc VALUES('it', 'it');
INSERT INTO language_enc VALUES('iu', 'iu');
INSERT INTO language_enc VALUES('ja', 'ja');
INSERT INTO language_enc VALUES('jv', 'jv');
INSERT INTO language_enc VALUES('ka', 'ka');
INSERT INTO language_enc VALUES('kg', 'kg');
INSERT INTO language_enc VALUES('ki', 'ki');
INSERT INTO language_enc VALUES('kj', 'kj');
INSERT INTO language_enc VALUES('kk', 'kk');
INSERT INTO language_enc VALUES('kl', 'kl');
INSERT INTO language_enc VALUES('km', 'km');
INSERT INTO language_enc VALUES('kn', 'kn');
INSERT INTO language_enc VALUES('ko', 'ko');
INSERT INTO language_enc VALUES('kr', 'kr');
INSERT INTO language_enc VALUES('ks', 'ks');
INSERT INTO language_enc VALUES('ku', 'ku');
INSERT INTO language_enc VALUES('kv', 'kv');
INSERT INTO language_enc VALUES('kw', 'kw');
INSERT INTO language_enc VALUES('ky', 'ky');
INSERT INTO language_enc VALUES('la', 'la');
INSERT INTO language_enc VALUES('lb', 'lb');
INSERT INTO language_enc VALUES('lg', 'lg');
INSERT INTO language_enc VALUES('li', 'li');
INSERT INTO language_enc VALUES('ln', 'ln');
INSERT INTO language_enc VALUES('lo', 'lo');
INSERT INTO language_enc VALUES('lt', 'lt');
INSERT INTO language_enc VALUES('lu', 'lu');
INSERT INTO language_enc VALUES('lv', 'lv');
INSERT INTO language_enc VALUES('mg', 'mg');
INSERT INTO language_enc VALUES('mh', 'mh');
INSERT INTO language_enc VALUES('mi', 'mi');
INSERT INTO language_enc VALUES('mk', 'mk');
INSERT INTO language_enc VALUES('ml', 'ml');
INSERT INTO language_enc VALUES('mn', 'mn');
INSERT INTO language_enc VALUES('mr', 'mr');
INSERT INTO language_enc VALUES('ms', 'ms');
INSERT INTO language_enc VALUES('mt', 'mt');
INSERT INTO language_enc VALUES('my', 'my');
INSERT INTO language_enc VALUES('na', 'na');
INSERT INTO language_enc VALUES('nb', 'nb');
INSERT INTO language_enc VALUES('nd', 'nd');
INSERT INTO language_enc VALUES('ne', 'ne');
INSERT INTO language_enc VALUES('ng', 'ng');
INSERT INTO language_enc VALUES('nl', 'nl');
INSERT INTO language_enc VALUES('nn', 'nn');
INSERT INTO language_enc VALUES('no', 'no');
INSERT INTO language_enc VALUES('nr', 'nr');
INSERT INTO language_enc VALUES('nv', 'nv');
INSERT INTO language_enc VALUES('ny', 'ny');
INSERT INTO language_enc VALUES('oc', 'oc');
INSERT INTO language_enc VALUES('oj', 'oj');
INSERT INTO language_enc VALUES('om', 'om');
INSERT INTO language_enc VALUES('or', 'or');
INSERT INTO language_enc VALUES('os', 'os');
INSERT INTO language_enc VALUES('pa', 'pa');
INSERT INTO language_enc VALUES('pi', 'pi');
INSERT INTO language_enc VALUES('pl', 'pl');
INSERT INTO language_enc VALUES('ps', 'ps');
INSERT INTO language_enc VALUES('pt', 'pt');
INSERT INTO language_enc VALUES('qu', 'qu');
INSERT INTO language_enc VALUES('rm', 'rm');
INSERT INTO language_enc VALUES('rn', 'rn');
INSERT INTO language_enc VALUES('ro', 'ro');
INSERT INTO language_enc VALUES('ru', 'ru');
INSERT INTO language_enc VALUES('rw', 'rw');
INSERT INTO language_enc VALUES('sa', 'sa');
INSERT INTO language_enc VALUES('sc', 'sc');
INSERT INTO language_enc VALUES('sd', 'sd');
INSERT INTO language_enc VALUES('se', 'se');
INSERT INTO language_enc VALUES('sg', 'sg');
INSERT INTO language_enc VALUES('si', 'si');
INSERT INTO language_enc VALUES('sk', 'sk');
INSERT INTO language_enc VALUES('sl', 'sl');
INSERT INTO language_enc VALUES('sm', 'sm');
INSERT INTO language_enc VALUES('sn', 'sn');
INSERT INTO language_enc VALUES('so', 'so');
INSERT INTO language_enc VALUES('sq', 'sq');
INSERT INTO language_enc VALUES('sr', 'sr');
INSERT INTO language_enc VALUES('ss', 'ss');
INSERT INTO language_enc VALUES('st', 'st');
INSERT INTO language_enc VALUES('su', 'su');
INSERT INTO language_enc VALUES('sv', 'sv');
INSERT INTO language_enc VALUES('sw', 'sw');
INSERT INTO language_enc VALUES('ta', 'ta');
INSERT INTO language_enc VALUES('te', 'te');
INSERT INTO language_enc VALUES('tg', 'tg');
INSERT INTO language_enc VALUES('th', 'th');
INSERT INTO language_enc VALUES('ti', 'ti');
INSERT INTO language_enc VALUES('tk', 'tk');
INSERT INTO language_enc VALUES('tl', 'tl');
INSERT INTO language_enc VALUES('tn', 'tn');
INSERT INTO language_enc VALUES('to', 'to');
INSERT INTO language_enc VALUES('tr', 'tr');
INSERT INTO language_enc VALUES('ts', 'ts');
INSERT INTO language_enc VALUES('tt', 'tt');
INSERT INTO language_enc VALUES('tw', 'tw');
INSERT INTO language_enc VALUES('ty', 'ty');
INSERT INTO language_enc VALUES('ug', 'ug');
INSERT INTO language_enc VALUES('uk', 'uk');
INSERT INTO language_enc VALUES('ur', 'ur');
INSERT INTO language_enc VALUES('uz', 'uz');
INSERT INTO language_enc VALUES('ve', 've');
INSERT INTO language_enc VALUES('vi', 'vi');
INSERT INTO language_enc VALUES('vo', 'vo');
INSERT INTO language_enc VALUES('wa', 'wa');
INSERT INTO language_enc VALUES('wo', 'wo');
INSERT INTO language_enc VALUES('xh', 'xh');
INSERT INTO language_enc VALUES('yi', 'yi');
INSERT INTO language_enc VALUES('yo', 'yo');
INSERT INTO language_enc VALUES('za', 'za');
INSERT INTO language_enc VALUES('zh', 'zh');
INSERT INTO language_enc VALUES('zu', 'zu');
INSERT INTO language_enc VALUES('zz', 'zz');

SELECT * FROM language_enc WHERE name :: language != lang;
explain select * from language_enc WHERE name::language != 'id';
