PostgreSQL to MySQL schema differences

Alex Beamish talexb-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Nov 22 20:23:56 UTC 2005


On 11/21/05, Madison Kelly <linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org> 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


Madison,

I don't get that at all .. I get a happy little CREATE TABLE message, and
displaying the table shows

nov22=# \d schedule
 Table "public.schedule"
 Column | Type | Modifiers
---------+------+-------------
 sch_dom | text | default '*'

I'm using 7.3.4 -- for now.

Alex

--
----------
Linux, Firefox and GMail .. what a combination.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20051122/8c31b425/attachment.html>


More information about the Legacy mailing list