Skip site navigation (1) Skip section navigation (2)

Re: sql problem with php

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: ljb <ljb220(at)mindspring(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: sql problem with php
Date: 2004-11-06 15:37:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php
On Friday 05 November 2004 20:40, ljb wrote:
> ff(at)dr(dot)ufu(dot)br wrote:
> > Hi,
> >
> >   I am having a problem with a system I developed using php with
> > postgres. ...
> >
> > I am not able to get a error_number in pgsql errors, only the error
> > message. So when I used pgsql 7.3 a used the string "referential
> > integrity violation" to detect this error, but on version 7.4 of pgsql
> > this string was replaced with "violates foreign key constraint" .
> > Anyone has a definitive solution on this or the way is to wait and change
> > all my code on future releases of pgsql?
> Unfortunately this is a limitation of the PHP PostgreSQL extension.
> PostgreSQL provids access to error numbers (I think as of 7.4)
> through libpq PQerrorField(), but PHP doesn't give you access to this yet.

Actually I believe you can get it:

though this will only work in pg74 or greater. 

Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to


pgsql-php by date

Next:From: ljbDate: 2004-11-06 22:53:23
Subject: Re: sql problem with php
Previous:From: ljbDate: 2004-11-06 01:40:34
Subject: Re: sql problem with php

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group