- bug fixed and related to samplings operation to manage column uppercase names with a postgres database. Sampler class modified adding "" for a column for database postgres.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/DatabasesResourcesManager@101046 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Loredana Liccardo 2014-10-27 16:13:43 +00:00
parent cba62f48f0
commit 850c0072b9
1 changed files with 2 additions and 2 deletions

View File

@ -172,14 +172,14 @@ public class Sampler {
if (DBType.equals(POSTGRES)) {
// attribute = "CAST(" + listColumns.get(i) + " as text), ";
attribute = "CAST(" + listColumns.get(i)
attribute = "CAST(" + "\"" +listColumns.get(i)+ "\""
+ " as character varying(255)), ";
if (i == (listColumns.size() - 1)) {
// attribute = "CAST(" + listColumns.get(i) +
// " as text)";
attribute = "CAST(" + listColumns.get(i)
attribute = "CAST(" + "\"" + listColumns.get(i)+ "\""
+ " as character varying(255))";
}