Re: Migrate from MySQL to PostgreSQL

From: Date: Fri, 23 Jan 2004 12:25:20 +0000
Subject: Re: Migrate from MySQL to PostgreSQL
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10315@lists.php.net to get a copy of this message
Alexey Borzov wrote: > PEAR::DB uses native PostgreSQL sequences, so you should do bad news... :( > CREATE SEQUENCE mysequence_seq; > > SELECT setval('mysequence_seq', /* here goes max value from MySQL's > "sequence" table */); > > I think you'll have to edit this manually. So if mysql has: CREATE TABLE mySequence_seq ( id int(10) unsigned NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; INSERT INTO "mySequence_seq" VALUES (21); I have to do: CREATE SEQUENCE mysequence_seq; SELECT setval('mysequence_seq', 21); this is the same and PEAR::DB could work with this? regards, Andreas

« previous php.pear.general (#10315) next »