Re: sequences implementation for DB/pgsql

From: Date: Wed, 13 Dec 2000 13:41:17 +0000
Subject: Re: sequences implementation for DB/pgsql
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-678@lists.php.net to get a copy of this message
Alexey Borzov wrote: > > Greetings! > > I've decided to give PEAR::DB a test and immediately noticed > that DB_pgsql lacks sequence support. > So I copied an implementation from DB_mysql and redone it for native > Postgres sequences. > The functions are tested and work as intended: > 1) if a sequence exists, nextId is returned, > 2) if it doesn't exist - it gets created, > 3) if it cannot be created - an error is returned (I tested with the > sequence names that begin with 'pg_' prefix, which is reserved for > system catalogs). > The functions are formatted in accordance with the "latest > standard", PHPDoc comments are added, blah-blah-blah > So you can just commit them into CVS. ;] Hi Alexey, I have sequences implemented in my local checkout, but I rewrote some error handling stuff at the same time that broke a few tests, so it's not committed yet. :-) I didn't append "_seq" to the actual sequence names though, it's probably a good idea, so I'll add that. Thanks. - Stig

« previous php.pear (#678) next »