Revision 10444
Added by Aaron Marcuse-Kubitza over 11 years ago
my2pg | ||
---|---|---|
20 | 20 |
-e 's/^ ((CONSTRAINT "[^"]*" )?((FULLTEXT|FOREIGN) )?KEY .*[^,])(,?)$/ \/*\1*\/CHECK (true)\5/' \ |
21 | 21 |
-e "s/\/\*.* (SET NAMES )([0-9A-Za-z_]+) \*\/;/\1'\2';/" \ |
22 | 22 |
-e 's/ (CHARACTER SET|COLLATE) [0-9A-Za-z_]+//g' \ |
23 |
-e "s/ COMMENT '.*'//g
|
|
23 |
-e "s! (COMMENT '.*')! /*\1*/!g
|
|
24 | 24 |
# COMMENTs never span multiple lines because newlines are encoded as \n" \ |
25 | 25 |
${sql_ascii:+-e 's/ varbinary/ text/g' }\ |
26 | 26 |
-e 's/ (binary|blob|varbinary)/ bytea/g' \ |
Also available in: Unified diff
bin/my2pg: comment out COMMENTs instead of removing them so that they will be included in the PostgreSQL translation. COMMENTs contain important metadata about columns, such as definitions and the meanings of integer flag values.