sending a block through jdbc

Поиск
Список
Период
Сортировка
От Maxime Lévesque
Тема sending a block through jdbc
Дата
Msg-id 741db998-8a4f-4442-930f-46821ff785d2@b18g2000yqb.googlegroups.com
обсуждение исходный текст
Ответы Re: sending a block through jdbc
Re: sending a block through jdbc
Список pgsql-jdbc
I want to drop a constraint if it exists, and not get an error if it
doesn't exist,
ideally I'd get a jdbc error code, and silence the 'consrtaint does
not exist' exception,
but since postgress doesn't send error codes to jdbc, I'd like to put
the statement in
a block and silence the exception like this

    sb.append("begin \n");
    sb.append("alter table " + foreingKeyTable.name + " drop
constraint " + fkName + ";\n");
    sb.append("exception when true then \n");
    sb.append("end;");

 statement.execute(sb.toString)

It seems that this is either unsupported or I have bad syntax....

Any clues on ho to do this ?

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Unified setBlobs / setBinaryStream question
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: sending a block through jdbc