Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Postgres] default value displayed instead of NULL #45198

Closed
2 tasks
troopa81 opened this issue Sep 22, 2021 · 0 comments · Fixed by #45199
Closed
2 tasks

[Postgres] default value displayed instead of NULL #45198

troopa81 opened this issue Sep 22, 2021 · 0 comments · Fixed by #45199
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@troopa81
Copy link
Contributor

What is the bug or the crash?

When a row contains NULL, the DEFAULT expression is displayed instead of NULL

Steps to reproduce the issue

  1. Create a Postgres test table and add some rows
create table default_int_2 ( id serial primary key, entier integer DEFAULT 2+2 );
insert into default_int_2 ("entier") values(1);
insert into default_int_2 ("entier") values(NULL);
insert into default_int_2 ("entier") values(4);
  1. Open the attribute table
  2. the default value is displayed although it should be NULL
    null_default

Versions

QGIS master bc37888854

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

Incoming PR!

@troopa81 troopa81 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 22, 2021
troopa81 added a commit to troopa81/QGIS that referenced this issue Sep 22, 2021
domi4484 pushed a commit to domi4484/QGIS that referenced this issue Sep 23, 2021
troopa81 added a commit to troopa81/QGIS that referenced this issue Sep 28, 2021
espinafre pushed a commit to espinafre/QGIS that referenced this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant