Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[11.3.279 Pro] - BUG ? Schema not listed in popup (Postgres) |
|
I've got a schema in a PostgreSQL database that doesn't show up on popup lists, therefore I cannot filter on it or expand it from the popup after typing SELECT. Is there a reason some schemas might get hidden?
EDIT: It seems that if a schema name is exactly the same as a login role name, that schema won't appear on popup lists. Typing its name and pressing . will list its contents (tables, functions, etc), however, it won't show up on its own. Is this intentional? It hinders selecting objects from those unfortunate schemas.
|
|
Mon Dec 21, 2020 11:51 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I managed to reproduce it. Yet it appears that roles with the same name mask schema names.
As a temporary workaround, please disable Server Objects query in SQL Assistant, in "Db Query" or "SQL Assistance" settings for Postgres. This will prevent it from retrieving role names
|
|
Mon Dec 21, 2020 5:37 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
I've tried disabling in DB Queries first, then in SQL Assistance and finally disabled both but the issue persists.
|
|
Mon Dec 21, 2020 6:31 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Apologies, here is the solution that should work with databases irrespective of the OID values used for schemas and roles
Please undo the changes described previous and modify "Schemas (PostgreSQL)" query. To the end of the query please add
 |
 |
ORDER BY 2 DESC |
Please let me know if this still doesn't work
|
|
Tue Dec 22, 2020 10:11 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
My colleague just tested in a different database, and in his case, it's the opposite ORDER BY 2 ASC. But one of them still should work, you may need to try both options.
|
|
Tue Dec 22, 2020 12:42 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
There are two entries for Schemas for PostgreSQL in DB Options / DB Queries, one for min version 7 and another one for min version 8.1. I modified both of them to be sure. The server version is
 |
 |
PostgreSQL 12.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit
|
Running both queries in the database the v7 returns 22 records, the missing schema is located at the 5th (SC) and 18th (SL) positions for ASC, and 4th (SL) and 19th (SC) for DESC.
The same for v8.1 is 30 records, with 5th (SC) and 19th (SL) positions for ASC, and 13th (SL) and 19th (SC) for DESC.
There must be further filtering on them because of those only 12 are shown in the popup regardless of the ordering omitted or set to ASC/DESC. In neither case is the wanted schema among them.
|
|
Mon Jan 04, 2021 3:20 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
May I recommend to wait for a few days with troubleshooting this issue. Version 11.5 is expected by the end of this week. I know it has some sort of a fix for it.
|
|
Tue Jan 05, 2021 5:34 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Sure, no problem.
|
|
Thu Jan 07, 2021 6:29 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Appears to be fixed.
|
|
Mon Jan 11, 2021 4:40 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you very much for confirming!
|
|
Mon Jan 11, 2021 11:11 am |
|
 |
|