PostgreSQL to MySQL schema differences

Joseph Kubik josephkubik-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Nov 22 19:58:15 UTC 2005


If you find a good guide to this problem for "the application developer"
please let me know.
I have some similar needs, and I see this issue becoming more important, not
less.
-Joseph-
On 11/22/05, Madison Kelly <linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org> wrote:
>
> Lennart Sorensen wrote:
> > On Mon, Nov 21, 2005 at 05:09:51PM -0500, Madison Kelly wrote:
> >
> >>Hi all,
> >>
> >> I am trying to get MySQL working on my backup program which, so far,
> >>only runs on PostgreSQL. I suspect this will be fine because I just use
> >>basic SQL calls (no stored procedures and such).
> >>
> >> My question is, my schema file I use to load the tables and data into
> >>the database on pgSQL doesn't work on MySQL (surprise). Is there any
> >>documentation on what is different between mysql and pgsql? I've been
> >>reading the MySQL docs (for v4.1) and I've learned how to create
> >>databases and users and such but I can't find anything on what is and is
> >>not valid. For example:
> >>
> >>CREATE TABLE schedule (
> >> sch_dom text default '*',
> >> ...
> >>);
> >>
> >> works on pgsql but fails on mysql saying:
> >>
> >>ERROR 1101 (42000) at line 67: BLOB/TEXT column 'sch_dom' can't have a
> >>default value
> >>
> >>
> >> If there is a central document or whatever on what is and is not
> >>allowed I'd be quite happy. :)
> >>
> >>Thanks all!
> >
> >
> > Maybe this would be of use to you:
> >
> > Package: dbconfig-common
> <snip>
> > Lennart Sorensen
> > --
> > The Toronto Linux Users Group. Meetings: http://tlug.ss.org
> > TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> > How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
> >
>
> Thanks Lennart!
>
> The trick is, I am looking for information on the differences on the
> two DBMS. I need the details because I am trying to extend my program to
> support MySQL. My program is written for different distros so I don't
> want to rely on any specific program if I can avoid it.
>
> I've actually got the schema modified to create the tables in MySQL
> now (you can't set a default for a 'text' table in MySQL!?). Now I am
> trying to figure out the MySQL equivelant of 'COPY...' and then modify
> the default values to load into mysql.
>
> Joys. :)
>
> Madison
> --
> The Toronto Linux Users Group. Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20051122/9abd3716/attachment.html>


More information about the Legacy mailing list