On Sat, 7 Oct 2006, Tom Lane wrote:

"Sergey E. Koposov" <[EMAIL PROTECTED]> writes:
Will it be enough to provide the testcase for just that 'expain UPDATE' ?

Whatever makes it crash ;-)

So, the database schema with little data and a few functions is here
http://lnfm1.sai.msu.ru/~math/public_misc/cas.dump

And the java program crashing the backend is attached. (it is generally
one prepared statement , which i didn't succeded to crash from psql) (it's possible to rewrite it in C with libpq, but I cannot do that very easily).

Regards,
        Sergey

*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: [EMAIL PROTECTED]
import java.sql.*;

public class xx
{
        public static void main(String args[]) throws Exception
        {
       Class.forName("org.postgresql.Driver");        
        Connection conn =  
DriverManager.getConnection("jdbc:postgresql://localhost:5432/cas","math","");
//        Thread.sleep(10000);
        conn.setAutoCommit(false);
        Statement stmt = conn.createStatement();
        stmt.execute("set search_path to cas_metadata_sega, cas_metadata");

        String query="UPDATE table_list SET description = ? WHERE " +          
        " id = cas_get_table_id ( ?,? )";
        String desc="\\tag{image SRC=\"/vizier/new2.gif\"}3rd release of DENIS 
(2005Sep)";
        PreparedStatement pstmt = conn.prepareStatement(query);        
        String catalog="cas_data_sega";
        String table="b_denis_denis5";
        pstmt.setString(1,desc);  
        pstmt.setString(2,catalog); 
        pstmt.setString(3,table);   
        pstmt.executeUpdate();   
        pstmt.close();
                conn.rollback();

    }
     

}
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to