Re: [HACKERS] rule and JDBC
It seems JDBC driver does not handle if a INSERT SQL statement performed by executeUpdate() is actually a SELECT, which is rewritten by the rule system. The JDBC spec says an exception should be thrown if the given SQL statement produces a ResultSet object which it does. As you note using executeQuery works, but won't if there isn't a rule. Perhaps using plain execute() would be the most appropriate thing to do. Kris Jurka Got it. With regard to this PostgreSQL JDBC driver confirms the JDBC spec. -- Tatsuo Ishii ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] rule and JDBC
On Thu, 29 Jan 2004, Tatsuo Ishii wrote: Hi, It seems JDBC driver does not handle if a INSERT SQL statement performed by executeUpdate() is actually a SELECT, which is rewritten by the rule system. The JDBC spec says an exception should be thrown if the given SQL statement produces a ResultSet object which it does. As you note using executeQuery works, but won't if there isn't a rule. Perhaps using plain execute() would be the most appropriate thing to do. Kris Jurka ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match