"missing source code" for PostgreSQL Stored Procedure
Answered
New to Data Grip. Connected to a redshift instance. I can see routines, but no details on them. They look like this:
-- auto-generated definition
create
procedure logs$track_run(i_start_time_dt timestamp, i_end_time_dt timestamp, i_script_name varchar, i_row_count int8, i_comments varchar, i_object_name varchar)
as $$
begin
-- missing source code
end;
$$;
I tried Forced Refresh a few times. (database tools --> Forget Cached Schemas then Force Refresh)
DataGrip 2019.3
Build #DB-193.5233.139, built on December 2, 2019
Please sign in to leave a comment.
Kevincrussell,
Could you try to reproduce the issue with the latest DataGrip and dedicated Redshift JDBC driver?
Experiencing same issue with PostgreSQL and MSSQL. Oracle and Sybase are fine, source code getting correctly extracted.
DataGrip 2021.2
vasily chernov,
I have the latest driver: ver 1.2.41.1065.
I am running DataGrip version 2019.3 but cannot upgrade due to my organizations rules.
It seems from the comments by Dmitry it occurs in the latest version also.
Kevincrussell,
You've got issues with Redshift. So the only way for you to update to the latest DataGrip to use Redshift JDBC driver version 2.X
Dmitry B Goydin,
Could you provide more details?
Have you tried `Force Refresh`?
Hi vasily chernov,
Thank you for looking into this.
The issue was found to be with many of tables/procedures not being assigned to correct roles after database's migration from Sybase.
Our DBA is sorting this out now.
Apologies!
Best Regards,
Dmitry
Upgrading resolved the issue. I did try force refresh but that did not help.
Current version: 2021.2
Driver: Amazon Driver ver 2.0.0.5
Hi ,
I have the same issue with Redshift database as well.
I'm using Datagrip version 2021.2.1 and Redshift driver 2.0.0.5 ( latest stable).
But still I'm not able to see the view definitions.
Any suggestions or alternatives much appreciated.
Thank you
Santosh
Skesavar2491,
Could you provide a sample? Provide a screenshot?
I have the same issue with Postgres functions showing "-- missing source code". I am running Datagrip 2022.3.3 Build #DB-223.8617.3 Built on 1-10-2023. This is a real productivity hindrance, so a resolution would be greatly appreciated. The PostgreSQL version is 11.16 and the Postgres driver version is 42.6.0. If there is some option that I don't have set correctly, please advise. Thanks!
Rick Murray
First, please check if the schema or database, where the problematic objects are located, is introspected. If this happens to the system database objects only, please make sure you have all schemas selected in the data source properties.
If all of that won't work, please upgrade to 2023.1.1 version and let us know your results afterward.
Hi Aleksandr,
I did as recommended: I set the "Load Source for" to "All schemas".
I downloaded and installed the recommended version:
And still no source! Any other recommendations you can think of?
Thanks for your time! Rick
Rick Murray, does it happen to all database objects, or are there only specific objects involved? Please provide some examples with screenshots
It does it for all Routines; functions or sp's Following are some examples:
create function address_search(saddress text) returns setof table("cname" varchar, "etype" char, "empid" char, "ename" varchar, "eaddress" text, "deps" text)
language plpgsql
as
$$
begin
-- missing source code
end;
$$;
alter function address_search(text) owner to psqladmin;
create function ahr_getcobraempfsacontributionsdetails(compid_param integer, pyrid_param integer, fsatype_param varchar, entrycodes_param varchar, empno_param varchar) returns setof table("empno" varchar, "fname" varchar, "lname" varchar, "claimtype" varchar, "claimamount" numeric, "pyrid" integer)
language plpgsql
as
$$
begin
-- missing source code
end;
$$;
alter function ahr_getcobraempfsacontributionsdetails(integer, integer, varchar, varchar, varchar) owner to psqladmin;
Thanks for the update, Rick Murray.
I'd propose to report this issue on our tracker.
When creating an issue, please add the dump model and diagnostic refresh logs
