Hi,
Sorry Peppe, I forgot to commit my last change.
Should be fixed now. I'll watch the automatic build to make sure,
Michaël
Le 05/11/2016 à 18:55, Giuseppe Aruta a écrit :
Hi Michael
there is a problem on this revision. See OpenJUMP-20161105-r5155.log
Peppe
2016-11-05 13:07 GMT+01:00 <jump-pilot-...@lists.sourceforge.net
<mailto:jump-pilot-...@lists.sourceforge.net>>:
Revision: 5155
http://sourceforge.net/p/jump-pilot/code/5155
<http://sourceforge.net/p/jump-pilot/code/5155>
Author: michaudm
Date: 2016-11-05 12:07:05 +0000 (Sat, 05 Nov 2016)
Log Message:
-----------
Fix regression with schema handling in old save to postgis plugin
Modified Paths:
--------------
core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis/SaveToPostGISDataSource.java
Modified:
core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis/SaveToPostGISDataSource.java
===================================================================
---
core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis/SaveToPostGISDataSource.java
2016-11-05 11:49:54 UTC (rev 5154)
+++
core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis/SaveToPostGISDataSource.java
2016-11-05 12:07:05 UTC (rev 5155)
@@ -386,11 +386,20 @@
private void addDBPrimaryKey(SpatialDatabasesDSConnection
conn, String dbSchema,
String dbTable, String primaryKey)
throws SQLException {
String tableFullName = SQLUtil.compose(dbSchema, dbTable);
- String sql_test_seq = "SELECT * FROM
information_schema.sequences\n" +
- " WHERE sequence_schema = '" + dbSchema + "'
AND sequence_name = 'openjump_dbid_sequence';";
- String sql_create_seq = "CREATE SEQUENCE \"" + dbSchema +
"\".openjump_dbid_sequence;";
- String sql_create_dbid = "ALTER TABLE " + tableFullName +
" ADD COLUMN \"" +
- primaryKey + "\" BIGINT DEFAULT nextval('\"" +
dbSchema + "\".openjump_dbid_sequence') PRIMARY KEY;";
+ String sql_test_seq, sql_create_seq, sql_create_dbid;
+ if (dbSchema == null) {
+ sql_test_seq = "SELECT * FROM
information_schema.sequences\n" +
+ " WHERE sequence_name =
'openjump_dbid_sequence';";
+ sql_create_seq = "CREATE SEQUENCE
openjump_dbid_sequence;";
+ sql_create_dbid = "ALTER TABLE " + tableFullName + "
ADD COLUMN \"" +
+ primaryKey + "\" BIGINT DEFAULT
nextval('openjump_dbid_sequence') PRIMARY KEY;";
+ } else {
+ sql_test_seq = "SELECT * FROM
information_schema.sequences\n" +
+ " WHERE sequence_schema = '" + dbSchema +
"' AND sequence_name = 'openjump_dbid_sequence';";
+ sql_create_seq = "CREATE SEQUENCE \"" + dbSchema +
"\".openjump_dbid_sequence;";
+ sql_create_dbid = "ALTER TABLE " + tableFullName + "
ADD COLUMN \"" +
+ primaryKey + "\" BIGINT DEFAULT nextval('\""
+ dbSchema + "\".openjump_dbid_sequence') PRIMARY KEY;";
+ }
boolean sequence_already_exists;
// check if openjump_dbid_sequence already exists
try {
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
<mailto:Jump-pilot-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel