cancel
Showing results for 
Search instead for 
Did you mean: 

mysql > postgres convertion

Piotr Kirklewski
Super Advisor

mysql > postgres convertion

Hi guys
I need to convert this MYSQL syntax to postgres syntax.
I did everythink fine but I don't know how to tell postgres to use LATIN1 as default charset for this table ?
Any ideas?

DROP TABLE IF EXISTS `City`;
CREATE TABLE `City` (
`ID` int(11) NOT NULL auto_increment,
`Name` char(35) NOT NULL default '',
`CountryCode` char(3) NOT NULL default '',
`District` char(20) NOT NULL default '',
`Population` int(11) NOT NULL default '0',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

PS

The converted (postgres) code looks like this:

DROP TABLE IF EXISTS City;
CREATE TABLE City (
ID SERIAL PRIMARY KEY,
Name char(35) NOT NULL default '',
CountryCode char(3) NOT NULL default '',
District char(20) NOT NULL default '',
Population int NOT NULL default '0',
(ID)
);

Jesus is the King