PostgreSQL to MySQL schema differences

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Mon Nov 21 22:09:51 UTC 2005


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!

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





More information about the Legacy mailing list