Skip to content

Commit 86abc32

Browse files
committed
fix: the queries for adding catalog numbers were failing on PostgreSQL.
The error was: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO michel_catalog(code) SELECT ? AS code FROM dual WHERE NOT EXISTS( SELECT * FROM michel_catalog WHERE code = ? )]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "dual" does not exist It's not clear why these queries didn't work without "FROM dual" before as I see that they work now. This commit reverts changes from b2eb7d0 The last part that finally fixes #1140
1 parent 4fa3a70 commit 86abc32

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

.travis.yml

-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ env:
1010
- MAVEN_OPTS='-Xss256k'
1111
#- secure: "fBav56BzY+A+Vs1g9YSfo1oLDCO1rFrXl49lJkOA5/XpnsKEEs4lI2RcOzz0wiJKXFNgcliiAJWoYMI8Esqz+lkyFWan4ij5Co0UzJcytDuY+2o+jaqwx45DuDYPogABzT+hWjLCxQLLG46gUkChzT8kcvOOn6JxC7Ff8q5MnoM="
1212

13-
# @todo #1054 Ensure all integration tests to pass on PostgreSQL
14-
jobs:
15-
allow_failures:
16-
- env: SPRING_PROFILES_ACTIVE=postgres
17-
1813
# travis_terminate is used for getting a fail-fast behavior and don't abort the execution of the Travis scripts.
1914
# See https://travis-ci.community/t/log-are-truncated-when-my-script-exits-abnormally/5878
2015
#

src/main/resources/sql/stamps_catalog_dao_queries.properties

-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ michel.create = \
22
INSERT \
33
INTO michel_catalog(code) \
44
SELECT :code AS code \
5-
FROM dual \
65
WHERE NOT EXISTS( \
76
SELECT * \
87
FROM michel_catalog \
@@ -13,7 +12,6 @@ scott.create = \
1312
INSERT \
1413
INTO scott_catalog(code) \
1514
SELECT :code AS code \
16-
FROM dual \
1715
WHERE NOT EXISTS( \
1816
SELECT * \
1917
FROM scott_catalog \
@@ -24,7 +22,6 @@ gibbons.create = \
2422
INSERT \
2523
INTO gibbons_catalog(code) \
2624
SELECT :code AS code \
27-
FROM dual \
2825
WHERE NOT EXISTS( \
2926
SELECT * \
3027
FROM gibbons_catalog \
@@ -35,7 +32,6 @@ yvert.create = \
3532
INSERT \
3633
INTO yvert_catalog(code) \
3734
SELECT :code AS code \
38-
FROM dual \
3935
WHERE NOT EXISTS( \
4036
SELECT * \
4137
FROM yvert_catalog \
@@ -46,7 +42,6 @@ solovyov.create = \
4642
INSERT \
4743
INTO solovyov_catalog(code) \
4844
SELECT :code AS code \
49-
FROM dual \
5045
WHERE NOT EXISTS( \
5146
SELECT * \
5247
FROM solovyov_catalog \
@@ -57,7 +52,6 @@ zagorski.create = \
5752
INSERT \
5853
INTO zagorski_catalog(code) \
5954
SELECT :code AS code \
60-
FROM dual \
6155
WHERE NOT EXISTS( \
6256
SELECT * \
6357
FROM zagorski_catalog \

0 commit comments

Comments
 (0)