View Issue Details

IDProjectCategoryView StatusLast Update
0008388VALENTINA STUDIOTool - SQL Editorpublic2019-09-25 06:38
ReporterCarlos FuentesAssigned ToSergey Pashkov 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformINTELOSMac OSOS Version10.14
Product Version8.6.x 
Target Version9.6.xFixed in Version9.6.x 
Summary0008388: Parameters not working for Postgresql on 8.6.1
DescriptionJust downloaded version 8.6.1 and attempted to run a simple query with parameters and got an error.
Steps To ReproduceRun query with parameter placeholder "?", set value if needed in parameters sections with "Use Parameters" turned on. Query fails. Replace parameter placeholder with value and query works.
See screenshot.
TagsNo tags attached.
Working with DB:postgreSQL Server
Version of your DB9.6.6

Activities

Carlos Fuentes

Carlos Fuentes

2018-10-11 14:40

reporter  

2018-10-11_10-23-21.png (65,196 bytes)
Carlos Fuentes

Carlos Fuentes

2018-10-11 14:57

reporter   ~0010506

Well I just realized my problem. It seems that bind variables are represented by $ followed by a number in postgresql. And that works just fine (thank you BTW - love this feature).
If I can I'd love to change this to a feature request: could we have a dropdown to automatically convert between bind variable syntax. This will allow users to use a query with bind variables on a different DB and also if the dropdown defaults to the syntax for the current DB it would help the user know what the right syntax is.
This will also help users (like me) when they have a SQL statement dumped from code that is parameterized with "?" and let them easily convert it to the appropriate bind variable syntax.
Before I had to go ? by ? and replace it with an appropriate value to test a query that was giving me trouble in our application.
Sergey Pashkov

Sergey Pashkov

2018-10-11 19:21

developer   ~0010507

Hello Carlos,

Unnamed '?' parameters were supposed to work, too, they are prepared the same way, I'll figure out why they are not applied.
Sergey Pashkov

Sergey Pashkov

2018-10-12 08:28

developer   ~0010508

Looks like libpq library doesn't support '?' parameters
https://www.postgresql.org/docs/current/static/libpq-exec.html

What client do you use? Maybe it implements '?' parameters on its own.

Anyway, conversion within the application would be helpful.
Sergey Pashkov

Sergey Pashkov

2019-09-24 19:53

developer   ~0010992

Now unnamed parameters are supported for all databases, including PostgreSQL
Ruslan Zasukhin

Ruslan Zasukhin

2019-09-25 06:38

administrator   ~0010994

Let me add -- Valentina Studio 9.6 on the fly replace ? to syntax which PostgreSQL understands.

Issue History

Date Modified Username Field Change
2018-10-11 14:40 Carlos Fuentes New Issue
2018-10-11 14:40 Carlos Fuentes File Added: 2018-10-11_10-23-21.png
2018-10-11 14:42 Sergey Pashkov Assigned To => Sergey Pashkov
2018-10-11 14:42 Sergey Pashkov Status new => assigned
2018-10-11 14:57 Carlos Fuentes Note Added: 0010506
2018-10-11 19:21 Sergey Pashkov Note Added: 0010507
2018-10-12 08:28 Sergey Pashkov Note Added: 0010508
2019-09-24 19:53 Sergey Pashkov Status assigned => resolved
2019-09-24 19:53 Sergey Pashkov Resolution open => fixed
2019-09-24 19:53 Sergey Pashkov Product Version => 8.6.x
2019-09-24 19:53 Sergey Pashkov Fixed in Version => 9.6.x
2019-09-24 19:53 Sergey Pashkov Target Version => 9.6.x
2019-09-24 19:53 Sergey Pashkov Note Added: 0010992
2019-09-25 06:38 Ruslan Zasukhin Note Added: 0010994