Skip to content
Permalink
Browse files

test: add "as" to test queries so they work with PostgreSQL 8.3

  • Loading branch information
vlsi committed Jan 16, 2018
1 parent b36867f commit 71b3c118f6a9e125c06e58faa50bf54b6a8f3400
Showing with 4 additions and 4 deletions.
  1. +4 −4 pgjdbc/src/test/java/org/postgresql/test/jdbc4/jdbc41/GetObjectTest.java
@@ -220,8 +220,8 @@ public void testGetTimestamp() throws SQLException {
@Test
public void testGetJavaUtilDate() throws SQLException {
Statement stmt = _conn.createStatement();
ResultSet rs = stmt.executeQuery("select TIMESTAMP '2004-10-19 10:23:54'::timestamp timestamp_without_time_zone_column"
+ ", null::timestamp null_timestamp");
ResultSet rs = stmt.executeQuery("select TIMESTAMP '2004-10-19 10:23:54'::timestamp as timestamp_without_time_zone_column"
+ ", null::timestamp as null_timestamp");
try {
assertTrue(rs.next());
Calendar calendar = GregorianCalendar.getInstance();
@@ -288,8 +288,8 @@ private void runGetTimestampWithTimeZone(TimeZone timeZone, String zoneString) t
public void testGetCalendar() throws SQLException {
Statement stmt = _conn.createStatement();

ResultSet rs = stmt.executeQuery("select TIMESTAMP '2004-10-19 10:23:54'::timestamp timestamp_without_time_zone_column"
+ ", TIMESTAMP '2004-10-19 10:23:54+02'::timestamp timestamp_with_time_zone_column, null::timestamp null_timestamp");
ResultSet rs = stmt.executeQuery("select TIMESTAMP '2004-10-19 10:23:54'::timestamp as timestamp_without_time_zone_column"
+ ", TIMESTAMP '2004-10-19 10:23:54+02'::timestamp as timestamp_with_time_zone_column, null::timestamp as null_timestamp");
try {
assertTrue(rs.next());
Calendar calendar = GregorianCalendar.getInstance();

0 comments on commit 71b3c11

Please sign in to comment.
You can’t perform that action at this time.