[libpostgresql-jdbc-java] 28/93: test added
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:18:48 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to annotated tag REL9_3_1102
in repository libpostgresql-jdbc-java.
commit de31165eb16e9716993ab883436570b72cf631c5
Author: Sergey Ignatov <sergey.ignatov at jetbrains.com>
Date: Thu Jan 30 15:00:56 2014 +0400
test added
---
org/postgresql/test/jdbc2/DatabaseMetaDataTest.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java b/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
index 543684e..2a387c5 100644
--- a/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
+++ b/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
@@ -55,6 +55,7 @@ public class DatabaseMetaDataTest extends TestCase
stmt.execute("CREATE OR REPLACE FUNCTION f3(IN a int, INOUT b varchar, OUT c timestamptz) AS $f$ BEGIN b := 'a'; c := now(); return; END; $f$ LANGUAGE plpgsql");
}
stmt.execute("CREATE OR REPLACE FUNCTION f4(int) RETURNS metadatatest AS 'SELECT 1, ''a''::text, now(), ''c''::text, ''q''::text' LANGUAGE SQL");
+ stmt.execute("CREATE OR REPLACE FUNCTION f5() RETURNS TABLE (i int) LANGUAGE sql AS 'SELECT 1'");
if (TestUtil.haveMinimumServerVersion(con, "7.3")) {
stmt.execute("CREATE DOMAIN nndom AS int not null");
@@ -744,6 +745,21 @@ public class DatabaseMetaDataTest extends TestCase
rs.close();
}
+ public void testFuncReturningTable() throws Exception {
+ DatabaseMetaData dbmd = con.getMetaData();
+ ResultSet rs = dbmd.getProcedureColumns(null, null, "f5", null);
+ assertTrue(rs.next());
+ assertEquals("returnValue", rs.getString(4));
+ assertEquals(DatabaseMetaData.procedureColumnReturn, rs.getInt(5));
+ assertEquals(Types.INTEGER, rs.getInt(6));
+ assertTrue(rs.next());
+ assertEquals("i", rs.getString(4));
+ assertEquals(DatabaseMetaData.procedureColumnReturn, rs.getInt(5));
+ assertEquals(Types.INTEGER, rs.getInt(6));
+ assertTrue(!rs.next());
+ rs.close();
+ }
+
public void testVersionColumns() throws SQLException
{
// At the moment just test that no exceptions are thrown KJ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list