Am trying to get recipe module working under postgres and MES
Have upgraded to 7.6.4_rc1
I can create defaults etc and they look fine in the production model.
If I use the recipe editor I can choose “add recipe” and give a recipe a name…however it then disappears and does not show up.
I can see the recipe of the same name created in the database.
Similarly the list and combo do not show added recipe.
If I tick “show item defaults” I can see the defaults correctly.
If I however add an “item path filter” it allways shows the whole enterprise in the defaults tree which also seems incorrect.
Am I missing something?
Hi,
What version of PostGres are you using?
I will try to replicate here and see if I can find out what is happening.
Hello,
I assume you are running 9.3. Our validation is against 9.0.
I have tested 9.3 and found the same issue, but I do have a work around.
- open the pgADmin console
- select the PostgreSQL 9.3 under the server that you are using
- under the “Tools” menu select “Server Configuration” -> postgresql.conf
- scroll down to “standard_conforming_strings” and enable it and set it to “off”
- under the “File” menu select Save then Reload Server
PostgreSQL had a driver change from 9.0 to 9.3 and we are looking how to handle both but this should work for you now.
PS I suspect this may also address some of the other issues with MES pathing I had been experiencing but had been ignoring to date.
Will let you know how i get on.
Suspect the easiest solution may be to use a "SET standard_conforming_strings = 0; " when you establish JDBC connection to force option to known state thus avoiding changes to current code.
As far as I am aware all the options available to combat this are:
-
check for standard_conforming_strings flag status and modify string as needed (standard SQL approach but messy)
-
check for standard_conforming_strings flag status and then escape as required with the E’Pre 9.1 string’ syntax when standard_conforming_strings = 1. (saves having to do parsing yourself but still messy, postgres centric)
-
use a "SET standard_conforming_strings = 0; and then use ‘Pre 9.1 string’ (not standard conforming, but likely avoids significant code change)
-
use a "SET standard_conforming_strings = 1; and then modify current code to provide ‘Post 9.0 string’ ( standard conforming, but string handling needs to be upgraded to >=9.1)
-
Use $$ escaping. (postgres centric, simple and works always, as well as handling single quotes without escape, will require code changes)
I found the link http://stackoverflow.com/questions/6229508/sql-how-to-escape-parentheses-in-postgresql which shows all these variants.
Good info, thanks for the input.
Putting
SET standard_conforming_strings = 0;
Into the database “Connection Initialization Commands” (advanced config) seems to do the trick.