src: |
  SELECT 'AJ'::text || a.a::text AS oid,
      lpad(a.a::text, 3, '0'::text) AS code,
      a.a::text ||
          CASE
              WHEN a.a = 1 THEN ' jour'::text
              ELSE ' jours'::text
          END AS texte,
      '2'::text AS level,
      '1'::text AS is_cti,
      '2'::text || lpad(a.a::text, 3, '0'::text) AS tri
     FROM generate_series(0, 366) a(a)
  UNION
   SELECT 'AJ-1'::text AS oid,
      chr(1) || '**'::text AS code,
      'Non renseigné'::text AS texte,
      '2'::text AS level,
      '1'::text AS is_cti,
      '1000'::text AS tri
    ORDER BY 6;