Re: returned value from SQL statement
От | Alain Roger |
---|---|
Тема | Re: returned value from SQL statement |
Дата | |
Msg-id | 75645bbb0803270250n4e387e16wc54e65f71d70aa4c@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: returned value from SQL statement (Richard Huxton <dev@archonet.com>) |
Список | pgsql-general |
thanks for the link regarding errors... i did not find it before.
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008
On Thu, Mar 27, 2008 at 10:47 AM, Richard Huxton <dev@archonet.com> wrote:
Alain Roger wrote:If it fails you'll get an error. The transaction will be aborted. How
> hi,
>
> i would like to know how can i control the returned value from a SQL
> statement ?
> for example, if i do an INSERT INTO... :
> 1. how can i know if the INSERT worked ?
> i mean i already trapped the unicity violation, but what if there is another
> error ? where can i get a complete list of exceptions ?
>
> 2. if the INSERT INTO is successful, how can i know it ? what is the
> returned value ?
you access this error code will depend on what library/client you are using.Same.
> 3. the same question as point 2 but for all SQL statements from PostgreSQL.There's a full list of error codes here if you want to know what went wrong:
> I read few books and every time this part is not treated correctly but only
> partially.
http://www.postgresql.org/docs/current/static/errcodes-appendix.html
Am I mis-understanding you?
--
Richard Huxton
Archonet Ltd
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008
В списке pgsql-general по дате отправления: