I cant seem to disable User Parameters

已回答

Hello

Every time I use a ? te IDE thinks I want to add a parameter when actually I'm trying to search a JSON field on a postgres DB.
This is dispite going into Preferences > Database > User Parameters and unticking both the enable box and even deleting the patterns containing ?.

Any ideas?

Thanks,
Ben

9

Hello Ben,

I would appreciate if you could attach a sample code and a screenshot, showing the issue. Thanks.

0

It seems to be working correctly since the last update :)

 
SELECT *
 
FROM   table1
 
WHERE  word_types ? 'v'
  
word_types is a json field. Ever time I was running within the console the set parameter box was popping up.  

Like I said though, its working now.

0
Hi, i am running into the same problem except with colons. 
If my SQL code contains one or more colons, the IDE thinks I am trying to use parameters, even though I don't want to use parameters.
I already disabled all the parameters in the settings and restarted.

Example is below.

select created_time, created_time::date as created_date from tablename limit 100

Thanks~

2

Can not reproduce. Tested with PostgreSQL. Can you please provide your File | Export Settings... jar (you can upload it to any file share or our ftp server at ftp://ftp.intellij.net/.uploads/ ), specify SQL dialect you use and attach a screenshot with the query in Editor. Thanks.

0

I'm running into the same issue as Jerry. When I use colons (:) in some SQL files it asks me to enter parameters. I'm using Pycharm professional edition 5.0.5 with Postgres dialect. I am uploading my settings now.

 I have disabled the User Parameter setting with the colon, but I still get this prompt, even after rebooting.

How can I fix this?

3

I am also unable to disable some of the user parameters. I can disable my custom parameters, but I always get prompted when i use a statement with semi-colons. 


This is a blocking issue for me.



 


SELECT "_v":approval::TEXT FROM @In LIMIT 10;

0

This is a bug for me as well as my team. Same error as Erik described with his screenshots above. I''m attempting to write SQL against the Snowflake JDBC driver. 

4

I have the same issue in working with Snowflake as the JSON queries utilize colons.

Anyone found a way to turn parameters off and avoid this issue?

4

This is also a blocking issue for me. I disabled all of the parameter patterns and I have both options checked off and it doesn't help... I can't run queries that have colons in the select using the Postgres dialect and the Vertica driver.

Please allow us to fully disable this annoying misfeature.

3

I couldn't figure out how to disable this feature (also using Snowflake and JSON). HOWEVER here is the workaround:

simply put the ":<identifier>" in as the parameter.

 

e.g. I'm trying to do:

SELECT

$1:id

FROM @SNOWFLAKE_INGEST(...)

 

when the param pops up for :id, I just put in :id (no quotes).

Works!

1

Same problem here, really annoying.

Whenever I have something like:

  ::JSONB

or conversion to any other type, I get this parameter dialog.

 

Please fix.

 

1

I just got this issue. It happens with a certain double-colon type cast right after a function: count(*)::numeric. The work-around mentioned by Erik thankfully works. How is this still a bug? And why on earth can't you disable this annoying feature?

0

It looks like you've got legacy user parameters.  Could you disable old user parameters and try to reproduce the issue? 

The current version is:

0

I can confirm the above. Also trying to query Snowflake JSON. This is so annoying and I can echo other users, how is this still a bug?

 

I have tried setting the dialect to Generic, SQL92 (the one recommended by Snowflake) https://snowflakecommunity.force.com/s/article/How-to-Configure-Snowflake-connections-for-Datagrip and Postgres. None work.

 

I don't even have a user parameter defined using colon. I'm on version 2018.1. The workaround suggested above works but it's annoying. Please fix!

 

 

 

1

This is also affecting queries to JSON columns in MemSQL:

select x.JsonColumn::$`0` , count(*)
from Table x
group by x.JsonColumn::$`0`
order by count(*) desc;

Datagrip will highlight part of the JSON accessors as variables. There are two interesting things to note:

1. Different parts of the JSON accessors are interpreted as user variables, so while the trick mentioned in this thread to supply the text as the parameter does work, it is different for the two instances of user parameters in the same query.

2. The `desc` part of the query is arbitrarily dropped from the query and sent separately, obviously making the results less useful and the subsequent query of just `desc` give an error.

I do have user parameters disabled, the same as Carmen's settings, and additionally I also disabled all parameter patterns that apply to SQL. I have the same list of parameters as Carmen, as well - none of the parameters are looking for : characters.

Until this is fixed, datagrip isn't really an option for me to use.

 

1

Same for me.

IDEA version: 2018.1 (Mar 27)

 

 





1

how can this be "answered" when it still doesn't work for Snowflake?

1

Still not fixed (IDEA 2018.2.3)

1

This is still a problem. it is NOT solved.  Datagrip 2018.2.4

2

I can also confirm this is still a problem with 2018.2.4 and a reason for me not to renew my subscription since it blocks any Snowflake queries with ::type conversions.

1

Use generic dialect for unsupported databases, that won't treat `:smth` as parameter. For postgres dialect these are parameters

2

Same problem for me with Snowflake and Datagrip 2018.2.5.  Re-typing the same value in the params popup works, but is insanely annoying to always do.  Un-ticked both boxes in the User Parameters setting screen and also tried changing to SQL92 dialect, neither did anything to change the behavior.

0

Alexander's suggestion of switching the dialect to "generic" helped me. Also, switching to "Redshift" fixes it I think.

0

I'm using Snowflake and switching to dialect = generic works.

0

this is now impacting redshift.

 

Don't install the most recent update!!!

0

@Scott Vickers,

Could you try to switch to the latest DataGrip with Snowflake native support and try to reproduce the issue?

 

0

@David Muraco,

What DataGrip version and db engine do you use?

Could you provide a screenshot of your user parameters settings (Database -> User Parameters) and provide sample SQL?

0

The problem with "colon"-parameter substitution probably has root in the following.

An SQL Dialect's inherent settings take precedence over Database->User Parameters->Parameter Patterns. Also, SQL Dialect configured for a database driver has higher priority than Global & Project SQL Dialect settings.

So by setting "Generic SQL" as driver's dialect we can suppress "colon"-parameter substitution behaviour ( which is inherent for postgres dialect )

0

This is happening to me in PyCharm PY-231.9225.15, using Snowflake. Changing the global and project dialects to Generic did not fix it.

0

Jack Goslin The problem was addressed in https://youtrack.jetbrains.com/issue/DBE-18188.

It should help to updated to the latest version 2023.2 of DataGrip.

0

请先登录再写评论。