pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedcapturing errors
3+ messages / 1 participants
[nested] [flat]
* capturing errors
@ 2010-01-29 16:06 Jaime Casanova <jcasanov@systemguards.com.ec>
0 siblings, 2 replies; 3+ messages in thread
From: Jaime Casanova @ 2010-01-29 16:06 UTC (permalink / raw)
To: pgsql-php
Hi,
I'm trying to capture the error from php to show an informative
message to the user but i haven't managed to get it...
i'm using pg_result_error_field() but when i print it i get nothing,
is there something i have to configure or what i'm doing bad.
attached a little php script for testing and here is the schema the
script is using (obviously the error i'm trying to catch here is
unique violation)
"""
create table t1_fk1(col1 integer primary key);
insert into t1_fk1 values(1);
"""
--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157
Attachments:
prueba.php (application/x-php, 1.1K) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: capturing errors
@ 2010-01-29 16:11 Jaime Casanova <jcasanov@systemguards.com.ec>
parent: Jaime Casanova <jcasanov@systemguards.com.ec>
1 sibling, 0 replies; 3+ messages in thread
From: Jaime Casanova @ 2010-01-29 16:11 UTC (permalink / raw)
To: pgsql-php
On Fri, Jan 29, 2010 at 11:06 AM, Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
> Hi,
>
> I'm trying to capture the error from php to show an informative
> message to the user but i haven't managed to get it...
>
i failed to say that i'm using pg 8.4.2 and php5
--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: capturing errors
@ 2010-01-29 17:01 Jaime Casanova <jcasanov@systemguards.com.ec>
parent: Jaime Casanova <jcasanov@systemguards.com.ec>
1 sibling, 0 replies; 3+ messages in thread
From: Jaime Casanova @ 2010-01-29 17:01 UTC (permalink / raw)
To: pgsql-php
On Fri, Jan 29, 2010 at 11:06 AM, Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
>
> i'm using pg_result_error_field() but when i print it i get nothing,
> is there something i have to configure or what i'm doing bad.
> attached a little php script for testing and here is the schema the
> script is using (obviously the error i'm trying to catch here is
> unique violation)
seems like i have to use pg_send_query() for the
pg_result_error_field() function to be used, but the problem is that
this is asynchronous could be a problem if i use transactions?
--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2010-01-29 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-01-29 16:06 capturing errors Jaime Casanova <jcasanov@systemguards.com.ec>
2010-01-29 16:11 ` Jaime Casanova <jcasanov@systemguards.com.ec>
2010-01-29 17:01 ` Jaime Casanova <jcasanov@systemguards.com.ec>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox