Re: Sequences in DB/pgsql (once again)

From: Date: Fri, 15 Dec 2000 00:17:15 +0000
Subject: Re: Sequences in DB/pgsql (once again)
References: 1 2 3 4  Groups: php.pear 
Request: Send a blank email to php-pear+get-696@lists.php.net to get a copy of this message
Hello Stig, On Fri, Dec 15, 2000 at 01:30 +0100, Stig S. Bakken wrote: > > Rui Hirokawa wrote: > > > > > I'm thinking of addressing postgres error mapping (so we can use DB's > > > DB_ERROR_BLAH error codes for things like these) by regular expression > > > matching on pg_errormessage() output. There are really no other ways to > > > do it as far as I can see. Again, the implementation will be supported > > > by regression tests so we can verify that it works in different postgres > > > versions. > > > > I think the regular expression matching is not efficient, > > but there is no other ways as you said. > > > > I think adding a function returning error code to libpq is better way. > > Modifying PHP's Postgres extension won't do, because libpq does not > offer error codes. Modifying libpq won't do either, because we still > have to support the "string only" behaviour for those who don't have the > modified libpq. Maybe we can get away with just defining an associative > array? I'll give it a shot. I don't know, but the exact messages might not be persistent across Postgres versions - be it in the past or in the future. -- Stay tuned, MhZ mailto:mookid@sigent.ru ----------- Doubt is not a pleasant condition, but certainty is absurd. -- Voltaire

« previous php.pear (#696) next »