Minor Feature Request

Поиск
Список
Период
Сортировка
Искать
От
NielsG
Тема
Minor Feature Request
Дата
Msg-id
42530F4C.6060502@aquafold.com
Список
Дерево обсуждения
Minor Feature Request NielsG <NielsG@aquafold.com>
Re: Minor Feature Request Kris Jurka <books@ejurka.com>
Re: Minor Feature Request Oliver Jowett <oliver@opencloud.com>
Re: Minor Feature Request Kris Jurka <books@ejurka.com>
Re: Minor Feature Request Oliver Jowett <oliver@opencloud.com>
Re: Minor Feature Request Oliver Jowett <oliver@opencloud.com>
Re: Minor Feature Request NielsG <NielsG@aquafold.com>
Re: Minor Feature Request Kris Jurka <books@ejurka.com>
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

В списке pgsql-jdbc по дате отправления
От: Paul Marchant
Дата:
От: Kris Jurka
Дата:
Сообщение: Re: Minor Feature Request
FAQ