Editing stored procedure - Unable to resolve parameters

Hi,

I'm using quite a bit of stored procedures in the project I'm working on. Although PHPStorm (and IntelliJ) gives me the ability to edit the stored procedure SQL source, and resolve columns and tables, it does not resolve the stored procedure parameters.

Example:

CREATE OR REPLACE PROCEDURE CHECK_ACCOUNT_STATUS (
IN P_CLIENT CHARACTER (9),
IN P_COUNTRY CHARACTER (5),
IN P_ACCOUNT_NUMBER CHARACTER (17),
OUT P_STATUS CHARACTER (5),
OUT P_MESSAGE CHARACTER (100)
)

...

SET P_STATUS = '';
SET P_MESSAGE = '';

P_STATUS is highlighted in PHPStorm (and IntelliJ) with a message "Unable to resolve column "P_STATUS"". Same goes for any parameter.

Is there a way to prevent this and for the IDE to know about the parameters?

0
4 comments

Hi there,

What's your IDE version(s) exactly? What SQL Dialect you are using (PostgreSQL?)?

This ticket seems relevant: https://youtrack.jetbrains.com/issue/DBE-3593 (unfortunately it does not say what build number has the fix).

  • If it's your case -- try next version (e.g. 2013.1.2 for PhpStorm... or maybe it will be only in 2017.1... -- better ask in the ticket)
  • If it's not -- https://youtrack.jetbrains.com/issues/DBE?q=stored%20procedure -- maybe you will find the right one there .. or submit your own ticket if none of existing matches your case
0
Avatar
Permanently deleted user

Thank you Andriy.

I'm currently using:

PhpStorm 2016.3.1
Build #PS-163.9735.1, built on December 6, 2016

I note the comment on https://youtrack.jetbrains.com/issue/DBE-3593 is on the 7th, so guess it will be in 2017.1.

0

Well ... 2016.3.2 will be released (EAP build is available right now) .. so it may get there as well

(sorry, not using this functionality myself + not PostgreSQL user -- I prefer other (more familiar and more complete) tools when working with SQL Server & MySQL)

0
Avatar
Permanently deleted user

Will check 2016.3.2 EAP

Mostly using DB2 UDB with some DB2 LUW in our environment. Although not ideal, PHPStorm and/or IntelliJ is by far superior to the other tools we have available (including the vendor supplied tools).

0

Please sign in to leave a comment.