Re: DB::createSequence(string $seq_name [ , integer start])

From: Date: Thu, 28 Nov 2002 06:19:26 +0000
Subject: Re: DB::createSequence(string $seq_name [ , integer start])
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11202@lists.php.net to get a copy of this message
Arnaud Limbourg écrit: > COuld you be a bit clearer, please ? I will try, sory for my bad english, I'm french. > Do you mean mean you want to start a sequence from a certain value ? Yes. Imagine that you save all the content of your database in a xml file. When you want to restore it (using DB) you delete all the content of your tables and then you store the data from your xml file in the tables. You need also to restore the value of sequences. For that, you can just drop and create sequences, so you need to create a sequence with a starting value. We could try to have a function to set the value of an existing sequence but it's not possible in all database (postgres for ex.). >> Hello >> >> Actually DB::createSequence can't set the starting value, but when we >> restore the database (for example from an xml file) using DB we can't >> restore the sequence, so we can't restore the database. >> >> I had a look in the sources for the differents backends and it seems >> possible to add the optional "start" argument for all backends. >> >> I'm not registered as a developper, but I can provide a patch >> for this modification or I can subscribe as a developper. But I can't >> test for all backends of course (just postgres and mysql). -- Emmanuel Chantréau 100% des gens sont dans une minorité de moins de 5% des gens.

« previous php.pear.dev (#11202) next »