Datagrip is displaying question marks within the DDL for my tables that have foreign keys, what is this and how can I fix it?
I have a project in Datagrip (a Postgres Database), which is running fine, but my DDL is displaying things such as:
“using ???;”
when referencing foreign keys, or at least I assume that's what is meant to go there.
I have the correct permissions, in fact, I see this issue even as the root user. So I'm unsure what is causing it, considering my data is intact, the foreign keys work as they should, but the DDL seems to have missing information.
请先登录再写评论。
Can you please provide a complete example of the table definition? Speaking of this issue, it could be related to a bug in the code generation, and similar issues have been reported in previous versions. If your DataGrip version is below 2024.3.3, please upgrade your IDE and check again.
Hello, thank you for the reply. I updated my IDE to 2024.3.4, and the problem still persists.
Here is one such example:
-- auto-generated definition
create table center
(
id serial
primary key,
external_id varchar(255),
external_source varchar(255),
name text
)
using ???;
alter table center
owner to table_owner;
create unique index center_external_id_external_source
on center using ??? (external_id, external_source);
create unique index center_external_id_external_source_site_text
on center using ??? (external_id, external_source, name);
grant select on center to read_only_user;
Thanks for the update.
The access method is absent in your screenshot. I tested create table DDL statement using various default access methods in postgres and in my case, it's showing the using portion correctly. It seems like we couldn't retrieve the meta of this object. Do you know if it's a custom access method used in this table and are you able to locate it in the Database Explorer under Database Objects?
Hey, I hope this information helps:
So, when I go to that location I see
when I run SELECT * from pg_am, which should give information about what is supported (or so I read) I see this:
So the containers with objects are not listed under Database Objects, which could be causing this issue. Please check if you have pg_catalog schema enabled for introspection. You may want to additionally refresh the database you're working with. See if the access methods are shown afterward
Hey, I'm not sure what you mean by “Please check if you have pg_catalog schema enabled for introspection. ”, but I did the following:
The problem still persists, and I've noticed the issue on other databases within Datagrip since first making this post, for unrelated projects that I have. So I'm thinking it's something to do with Datagrip itself. They do not have the problem when inspecting the DDL by connecting to it outside of Datagrip, from a third party.
Any other ideas?
If this doesn't bring you any further, please collect the following logs and upload onto FTP https://uploads.jetbrains.com/
- idea log in Help - Show Log in Files
- database log in Help - Show SQL Log in Files
- introspector logs as per this article https://www.jetbrains.com/help/datagrip/reporting-database-objects-list-in-the-database-tree-is-not-accurate.html
We have had a similar issue reported on our tracker, so we'll take it into consideration
https://youtrack.jetbrains.com/issue/DBE-18889/Database-Objects-is-empty
Please include the upload id in your reply