X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BD636536EF for ; Tue, 5 Apr 2005 23:14:42 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00505-08 for ; Tue, 5 Apr 2005 22:14:41 +0000 (GMT) Received: from aquafold.com (s50.n3.vds2000.com [66.84.3.50]) by svr1.postgresql.org (Postfix) with ESMTP id 4286C5362A for ; Tue, 5 Apr 2005 23:14:40 +0100 (BST) Received: from [192.168.1.100] (119.95.218.209.transedge.com [209.218.95.119]) by aquafold.com (8.11.6/8.11.6) with ESMTP id j35MEeb18148; Tue, 5 Apr 2005 18:14:41 -0400 Message-ID: <42530F4C.6060502@aquafold.com> Date: Tue, 05 Apr 2005 15:21:00 -0700 From: NielsG User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org, books@ejurka.com Subject: Minor Feature Request Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/30 X-Sequence-Number: 12637 Hi, I am trying to figure out if I can get the line number, when executing a "CREATE FUNCTION" statement which fails. The line number of where the error occurs. For example, if I execute: CREATE OR REPLACE FUNCTION "public"."new_func" (xid, xid) RETURNS bool AS ' BEGIN IFsss $2 IS NULL THEN return ''NULL''; ELSE return ''NOT_NULL''; END IF; END ' LANGUAGE 'plpgsql' I would like to get back the line number 4, which is the line in where the syntax error occurs. Could this be placed in the SQLException.getMessage() text? If so, then I can parse out the line number for my use. Otherwise, I can't find the line number anywhere. Example: [ERROR: Line 4: syntax error at or near "ELSE"] In PGAdmin you get the line number in the text message, but I assume it is using the native API. In a Java Query tool which uses JDBC the line number would be nice. thanks -Niels