<div dir="ltr"><div>Hi all,</div><div><br></div><div>I'm trying to prevent QGIS from casting bigint/bigserial primary keys to text. I've submitted a pull request ( <a href="https://github.com/qgis/QGIS/pull/34780">https://github.com/qgis/QGIS/pull/34780</a> ); it builds and runs correctly on my system (PostgreSQL 12.2, Gentoo Linux), but the unit tests fail both on my system and on Travis (which I understand has PostgreSQL 11); Azure seems to be happy with it.</div><div><br></div><div>I'm a bit at a loss on what to do next; I think that maybe the test should be updated, since we don't treat bigint PostgreSQL PKs as text anymore, but I'm unsure if that is the correct way.</div><div><br></div><div>The specific test I'm looking at is ran with</div><div><br></div><div>$ ctest -V -R PyQgsPostgresProvider</div><div><br></div><div>And it fails at</div><div>tests/src/python/test_provider_postgres.py:410</div><div><br></div><div>Ordinary integers are tested differently (as can be seen on line 398).</div><div><br></div><div>Jürgen Fischer pointed me to the discussion in PR #3036 ( <a href="https://github.com/qgis/QGIS/pull/3036">https://github.com/qgis/QGIS/pull/3036</a> ), which was made to allow for negative  PKs, but changed bigint PKs to text.</div><div><br></div><div>Can you please shed some light on this issue? M. Kuhn? Anyone?</div><div><br></div><div>Thank you very much.</div><div>P.S.: here are the reports (besides my own itch) that motivated this PR:</div><div><a href="https://github.com/qgis/QGIS/issues/34077">https://github.com/qgis/QGIS/issues/34077</a></div><div><a href="https://gis.stackexchange.com/questions/348536/qgis-form-performance">https://gis.stackexchange.com/questions/348536/qgis-form-performance</a></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">... et cognoscetis veritatem et veritas liberabit vos.</div></div></div>