[QGIS-Developer] Help with PR 34780 (don't cast PostgreSQL bigint PKs to text)

José de Paula Rodrigues espinafre at gmail.com
Fri Feb 28 19:16:58 PST 2020


Hi all,

I'm trying to prevent QGIS from casting bigint/bigserial primary keys to
text. I've submitted a pull request (
https://github.com/qgis/QGIS/pull/34780 ); 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.

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.

The specific test I'm looking at is ran with

$ ctest -V -R PyQgsPostgresProvider

And it fails at
tests/src/python/test_provider_postgres.py:410

Ordinary integers are tested differently (as can be seen on line 398).

Jürgen Fischer pointed me to the discussion in PR #3036 (
https://github.com/qgis/QGIS/pull/3036 ), which was made to allow for
negative  PKs, but changed bigint PKs to text.

Can you please shed some light on this issue? M. Kuhn? Anyone?

Thank you very much.
P.S.: here are the reports (besides my own itch) that motivated this PR:
https://github.com/qgis/QGIS/issues/34077
https://gis.stackexchange.com/questions/348536/qgis-form-performance
-- 
... et cognoscetis veritatem et veritas liberabit vos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200229/7948ee44/attachment.html>


More information about the QGIS-Developer mailing list