public boolean execute() throws SQLException
public boolean execute(String p_sql) throws SQLException
	public boolean execute() throws SQLException	{		if (isFunction && !returnTypeSet)			throw new PSQLException("postgresql.call.noreturntype");		if (isFunction)		{ // set entry 1 to dummy entry..			m_binds[0] = ""; // dummy entry which ensured that no one overrode			m_bindTypes[0] = PG_TEXT;			// and calls to setXXX (2,..) really went to first arg in a function call..		}		// New in 7.1, if we have a previous resultset then force it to close		// This brings us nearer to compliance, and helps memory management.		// Internal stuff will call ExecSQL directly, bypassing this.		if (result != null)		{			java.sql.ResultSet rs = getResultSet();			if (rs != null)				rs.close();		}		//Use server prepared statements if directed		if (m_useServerPrepare)		{			if (m_statementName == null)			{				m_statementName = "JDBC_STATEMENT_" + m_preparedCount++;				m_origSqlFragments = new String[m_sqlFragments.length];				m_executeSqlFragments = new String[m_sqlFragments.length];				System.arraycopy(m_sqlFragments, 0, m_origSqlFragments, 0, m_sqlFragments.length);				m_executeSqlFragments[0] = "EXECUTE " + m_statementName;				if (m_sqlFragments.length > 1)				{					m_executeSqlFragments[0] = m_executeSqlFragments[0] + "(";					for (int i = 1; i < m_bindTypes.length; i++)					{						m_executeSqlFragments[i] = ", ";					}					m_executeSqlFragments[m_bindTypes.length] = ")";				}				synchronized (sbuf)				{					sbuf.setLength(0);					sbuf.append("PREPARE ");					sbuf.append(m_statementName);					if (m_origSqlFragments.length > 1)					{						sbuf.append("(");						for (int i = 0; i < m_bindTypes.length - 1; i++)						{							sbuf.append(m_bindTypes[i]);							sbuf.append(", ");						}						sbuf.append(m_bindTypes[m_bindTypes.length - 1]);						sbuf.append(")");					}					sbuf.append(" AS ");					sbuf.append(m_origSqlFragments[0]);					for (int i = 1; i < m_origSqlFragments.length; i++)					{						sbuf.append(" $");						sbuf.append(i);						sbuf.append(" ");						sbuf.append(m_origSqlFragments[i]);					}					sbuf.append("; ");					sbuf.append(m_executeSqlFragments[0]);					m_sqlFragments[0] = sbuf.toString();					System.arraycopy(m_executeSqlFragments, 1, m_sqlFragments, 1, m_sqlFragments.length - 1);				}			}			else			{				m_sqlFragments = m_executeSqlFragments;			}		}                // Use a cursor if directed and in a transaction.                else if (fetchSize > 0 && !connection.getAutoCommit())                {                        // The first thing to do is transform the statement text into the cursor form.                        String[] cursorBasedSql = new String[m_sqlFragments.length];                        // Pinch the prepared count for our own nefarious purposes.                        String statementName = "JDBC_CURS_" + m_preparedCount++;                        // Setup the cursor decleration.                        // Note that we don't need a BEGIN because we've already                        // made sure we're executing inside a transaction.                        String cursDecl = "DECLARE " + statementName + " CURSOR FOR ";                        String endCurs = " FETCH FORWARD " + fetchSize + " FROM " + statementName + ";";                        // Copy the real query to the curs decleration.                        try                        {                                // Need to confirm this with Barry Lind.                                if (cursorBasedSql.length > 1)                                        throw new IllegalStateException("cursor fetches not supported with prepared statements.");                                for (int i = 0; i < cursorBasedSql.length; i++)                                {                                        if (i == 0)                                        {                                                if (m_sqlFragments[i].trim().toUpperCase().startsWith("DECLARE "))                                                        throw new IllegalStateException("statement is already cursor based.");                                                cursorBasedSql[i] = cursDecl;                                        }                                        if (cursorBasedSql[i] != null)                                                cursorBasedSql[i] += m_sqlFragments[i];                                        else                                                cursorBasedSql[i] = m_sqlFragments[i];                                        if (i == cursorBasedSql.length - 1)                                        {                                                // We have to be smart about adding the delimitting ";"                                                if (m_sqlFragments[i].endsWith(";"))                                                        cursorBasedSql[i] += endCurs;                                                else                                                        cursorBasedSql[i] += (";" + endCurs);                                        }                                        else if (m_sqlFragments[i].indexOf(";") > -1)                                        {                                                throw new IllegalStateException("multiple statements not "                                                                                + "allowed with cursor based querys.");                                        }                                }                                // Make the cursor based query the one that will be used.                                if (org.postgresql.Driver.logDebug)                                        org.postgresql.Driver.debug("using cursor based sql with cursor name " + statementName);                                // Do all of this after exceptions have been thrown.                                m_statementName = statementName;                                m_statementIsCursor = true;                                m_sqlFragments = cursorBasedSql;                        }                        catch (IllegalStateException e)                        {                                // Something went wrong generating the cursor based statement.                                if (org.postgresql.Driver.logDebug)                                        org.postgresql.Driver.debug(e.getMessage());                        }                }		// New in 7.1, pass Statement so that ExecSQL can customise to it                		result = QueryExecutor.execute(m_sqlFragments,                                               m_binds,                                               this);		//If we are executing a callable statement function set the return data		if (isFunction)		{			if (!result.reallyResultSet())				throw new PSQLException("postgresql.call.noreturnval");			if (!result.next ())				throw new PSQLException ("postgresql.call.noreturnval");			callResult = result.getObject(1);			int columnType = result.getMetaData().getColumnType(1);			if (columnType != functionReturnType)				throw new PSQLException ("postgresql.call.wrongrtntype",										 new Object[]{											 "java.sql.Types=" + columnType, "java.sql.Types=" + functionReturnType });			result.close ();			return true;		}		else		{			return (result != null && result.reallyResultSet());		}	}