~ubuntu-branches/ubuntu/maverick/libpgjava/maverick

« back to all changes in this revision

Viewing changes to org/postgresql/test/jdbc3/ParameterMetaDataTest.java

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2008-04-26 22:01:11 UTC
  • mfrom: (3.1.4 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080426220111-yasgxtas5smx2qm3
Tags: 8.2-504-2
* Updated description to mention PostgreSQL 8.3 as supported.
  Closes: #398348
* Removed libpgjava transitional package. Closes: #477557
* Moved debhelper and cdbs from Build-Depends-Indep to Build-Depends.
* Added Homepage, Vcs-Svn and Vcs-Browser fields.
* Added watch file.
* Added myself to Uploaders.
* Removed Stafan and Wolfgang from Uploaders.
* Updated Standards-Version to 3.7.3
* Updated debhelper level to 5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
* Copyright (c) 2005, PostgreSQL Global Development Group
4
4
*
5
5
* IDENTIFICATION
6
 
*   $PostgreSQL: pgjdbc/org/postgresql/test/jdbc3/ParameterMetaDataTest.java,v 1.2 2005/04/10 21:54:17 jurka Exp $
 
6
*   $PostgreSQL: pgjdbc/org/postgresql/test/jdbc3/ParameterMetaDataTest.java,v 1.4 2006/05/15 09:35:57 jurka Exp $
7
7
*
8
8
*-------------------------------------------------------------------------
9
9
*/
21
21
        super(name);
22
22
    }
23
23
 
24
 
    protected void setUp() throws SQLException {
 
24
    protected void setUp() throws Exception {
25
25
        _conn = TestUtil.openDB();
26
26
        TestUtil.createTable(_conn, "parametertest", "a int4, b float8, c text, d point");
27
27
    }
32
32
    }
33
33
 
34
34
    public void testParameterMD() throws SQLException {
35
 
        if (!TestUtil.haveMinimumServerVersion(_conn, "7.4"))
 
35
        if (!TestUtil.isProtocolVersion(_conn, 3))
36
36
            return;
37
37
 
38
38
        PreparedStatement pstmt = _conn.prepareStatement("SELECT a FROM parametertest WHERE b = ? AND c = ? AND d >^ ? ");
53
53
    }
54
54
 
55
55
    public void testFailsOnBadIndex() throws SQLException {
56
 
        if (!TestUtil.haveMinimumServerVersion(_conn, "7.4"))
 
56
        if (!TestUtil.isProtocolVersion(_conn, 3))
57
57
            return;
58
58
 
59
59
        PreparedStatement pstmt = _conn.prepareStatement("SELECT a FROM parametertest WHERE b = ? AND c = ?");
70
70
 
71
71
    // Make sure we work when mashing two queries into a single statement.
72
72
    public void testMultiStatement() throws SQLException {
73
 
        if (!TestUtil.haveMinimumServerVersion(_conn, "7.4"))
 
73
        if (!TestUtil.isProtocolVersion(_conn, 3))
74
74
            return;
75
75
 
76
76
        PreparedStatement pstmt = _conn.prepareStatement("SELECT a FROM parametertest WHERE b = ? AND c = ? ; SELECT b FROM parametertest WHERE a = ?");