subject: mysql to pgsql Perl DBD shortcut

Paul Seamons paul at seamons.com
Thu Feb 21 10:44:46 MST 2013


Steve is right on here.  I doubt bugzilla is using an ORM - if they had 
you could swap out db backends.  They are likely using straight DBI.  In 
that case *most* stuff should just work cross db, but things like my $id 
= $dbh->{'mysql_insertid'} are not going to fly.  Only way to fix that 
is to hack up the driver to catch access to that key.  I don't think it 
would be too much work for this this particular one.  But if there are 
other mysql specific syntax pieces you are hosed.  I doubt bugzilla does 
to much table creation - or if they do you could just hijack that step.

Paul

On 02/21/2013 09:01 AM, Steve Alligood wrote:
> the issue is not the mysql versus postgres DBD, it is what they wrote the sql to be.
>
> If a product only supports mysql, it will often use mysql proprietary syntax that will not work in postgres.
>
> -Steve
>
>
> On Feb 21, 2013, at 7:44 AM, Jason Hall wrote:
>
>> Well, if you are just using the DBI, then you just change your connect
>> string and everything else works. Nobody should be using just a straight
>> DBD itself.
>>
>> On Thu, Feb 21, 2013 at 1:41 AM, Grant Shipley <gshipley at gmail.com> wrote:
>>
>>> Being a non perl developer, I would assume they have an ORM library you
>>> could use.
>>>
>>> --
>>> gs
>>>
>>> On Feb 21, 2013, at 7:58 AM, DANIEL DAVID EGLI <ddavidegli at gmail.com>
>>> wrote:
>>>
>>>> *Does anyone know of a (hacked?) Perl DBD driver that reroutes mysql
>>> calls
>>>> to pgsql calls? I'm in process of designing a web site that will rely
>>>> heavily on postgresql, but I also need to incorporate bugzilla which,
>>> last
>>>> I looked, relies exclusively on mysql. I'd rather not go through the
>>> hassle
>>>> of having two different database engines running on the same machine. So
>>> I
>>>> figured I'd look into ways of tricking (for lack of a better term)
>>> bugzilla
>>>> to work on pgsql. Obviously the first method is to rewrite all the
>>> bugzilla
>>>> files. But that's a LOT of files. I figured it would be a heck of a lot
>>>> less work to have a fake DBD::MySQL that in turn calls the function calls
>>>> of DBD::PGSQL for each of it's functions. If anyone knows of a site I
>>> could
>>>> download such a Perl driver for, I'd be grateful. Or a site where I could
>>>> download a Bugzilla that is already converted to PostgreSQL would be good
>>>> too.*
>>>>
>>>> * *
>>>>
>>>> *Thanks!*
>>>>
>>>> * *
>>>>
>>>> *--- Dan*
>>>>
>>>> /*
>>>> PLUG: http://plug.org, #utah on irc.freenode.net
>>>> Unsubscribe: http://plug.org/mailman/options/plug
>>>> Don't fear the penguin.
>>>> */
>>> /*
>>> PLUG: http://plug.org, #utah on irc.freenode.net
>>> Unsubscribe: http://plug.org/mailman/options/plug
>>> Don't fear the penguin.
>>> */
>>>
>>
>>
>> -- 
>> Jayce^
>>
>> Preparing Deseret - UtahPreppers
>> ????? ????
>>
>> /*
>> PLUG: http://plug.org, #utah on irc.freenode.net
>> Unsubscribe: http://plug.org/mailman/options/plug
>> Don't fear the penguin.
>> */
>
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */



More information about the PLUG mailing list