Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #108

Re: sqlstate or messages in pltcl

From "Laurenz Albe" <invite@spam.to.invalid>
Newsgroups comp.databases.postgresql
References <8s6vvqFiv3U1@mid.uni-berlin.de> <8selq5Fv57U1@mid.uni-berlin.de>
Subject Re: sqlstate or messages in pltcl
Date 2011-05-03 09:20 +0200
Organization dienste.wien.at ISP
Message-ID <1304407248.229356@proxy.dienste.wien.at> (permalink)

Show all headers | View raw


M. Strobel wrote:
>> I am looking for a way to get the database messages and sqlstate
>> in pltcl, and I can't find it in the docs.
>>
>> Must be something like "pg_result $db -status" in pgtcl,
>> or $stmt->errorInfo() in PHP.
>>
>> Is this information somewhere in the system tables?
>>
>> /Str.
>
> so nothing in the system catalogs?

It cannot be in the system catalogs because it is not persistent.

Unfortunately I know nothing about Tcl, but the manual says
(for spi_exec): "An error in the command causes an error to be raised."

So I guess you should catch that error and examine the information
therein. It should contain the message, and maybe it also contains the
SQLSTATE.

Yours,
Laurenz Albe 

Back to comp.databases.postgresql | Previous | NextNext in thread | Find similar


Thread

Re: sqlstate or messages in pltcl "Laurenz Albe" <invite@spam.to.invalid> - 2011-05-03 09:20 +0200
  Re: sqlstate or messages in pltcl "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2011-05-04 10:11 +0200

csiph-web