Error displaying composite types in postgres : all values are NULL where they shouldn't be
See original GitHub issueSystem information:
- Operating system (distribution) and version Windows 10 Pro
- DBeaver version Issues detected from 5.2 to current 5.3.3.X
- Java version 1.8.0_77
- Additional extensions None
Connection specification:
- Database name and version postgres 10 to 11
- Driver name PostgreSQL
- Do you use tunnels or proxies (SSH, SOCKS, etc)? Yes, ssh tunnel
Describe the problem you’re observing:
When creating a table that contains a composite type (type made of two or more values), then vizualising the table, All composite values shows up as NULL
Steps to reproduce, if exist:
– create a composite type CREATE TYPE committee_id_type AS (commmittee_code varchar(6), subcommittee_number smallint); –create a table using it CREATE TABLE wrong_composite_display ( id int , comm committee_id_type ) ; – insert any data inside the table –visualize the table SELECT * FROM wrong_composite_display ;
Problem : DBeaver correctly find the composite type columns names, but display all the values as NULL, even if they are not.
Here is a screenshot, very explicit I have to explicitly select the columns of the type to see something that is not null
Note that this bug only happens when using the Grid
display.
When using the Text
display things show up appropriately.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Hey @serge-rider and @uslss , I’m afraid bug hasn’t been solved (running DBeaver EE 6.1) 😕
I tried my best to reproduce and pinpoint the bug, and I think I have it fearly delimitated. So creating a fresh db, with the latest postgres (11): in DBeaver database navigator, make the
public
schema active, thenNot working
Working :
At this point, it can randomly work or not (meaning, display the appropriate values in the ‘grid’ format)! Thankfully, a couple of steps allow to either correctly or incorrectly display :
composite_type_indexing
schema activecomposite_type_indexing
schema should still be active)So that looks like 2 problems:
To finish, I also noted two other bugs regarding composite types (not sure if they should go on another ticket). Both bugs seem to be related.
''
instead ofNULL
):The exception is
NumberFormatException: For input string: ""
. I’d guess you internally convert int to string, without dealing explicitly with the NULL value. Sounds like an easy fix though.Second row should not be all
NULL
Yes, see milestone tag (on the top)