title: Postgresql 9.2 error with group by which doesn't appear in postgresql 12
body: <p>I have a postgresql function with 'GROUP BY' which works fine on my local server (postgresql version is 12.6) but gets the famous error 'column &quot;f.fa_docnum&quot; must appear in the GROUP BY clause or be used in an aggregate function' on the web server, which runs postgresql 9.2.24. I'm completely confused about that. The documentation of the 2 versions are exactly the same for the GROUP BY clause.</p>
  <p>Here is the function (a bit simpler than the original one, but it gets the same results) :</p>
  <pre><code>SELECT 
              f.fa_docnum,
              f.fa_date, 
              sum(l.lj_credit), 
              sum(l.lj_debit)
              FROM livrejournal l, document d, facture_achat f
              WHERE d.doc_id = l.lj_docid 
              AND d.doc_fa_docnum = f.fa_docnum
              AND f.fa_fournisseur = 59               
              GROUP BY (f.fa_docnum, f.fa_date);
  </code></pre>
  <p>On the production site with 9.2 version, I get no error if I delete 'f.fa_date' column in the GROUP BY clause, while on the local dev site with 12.6 (and formerly lower versions) I get no error in any case.
  If anybody has an idea about this strange behavior, and maybe some tip or workaround, I would greatly appreciate it.</p>