1
|
"PostgreSQL","MySQL","Comments"
|
2
|
,,"PostgreSQL-only features"
|
3
|
"^SET\b[^;]*;",,
|
4
|
"^(?:CREATE|ALTER) (?:AGGREGATE|SEQUENCE)\b[^;]*;",,
|
5
|
"^COMMENT\b[^;]*;",,
|
6
|
"^ALTER TABLE\b[^;]*\bSET DEFAULT nextval\([^;]*\)[^;]*;",,
|
7
|
"^CREATE\b[^;]*\bINDEX\b[^;]*\([^;]*\([^;]*;",,
|
8
|
"\bDEFAULT \w*\(.*\)",,".* rather than .*? to allow nested ()"
|
9
|
"^(CREATE\b[^;]*\bINDEX\b[^;]*\b)USING \w+","\1",
|
10
|
"(?<=\bALTER TABLE )ONLY ",,
|
11
|
,,"syntax changes"
|
12
|
"^--(?=\S)","\g<0> ",
|
13
|
"""([^""]*?)""","`\1`",
|
14
|
"(?<=DEFAULT )(\d+|'[^']*')::\w+(?: \w+)*","\1",
|
15
|
"(\d+|'[^']*')::(\w+(?: \w+)*)","CAST(\1 AS \2)",
|
16
|
,,"datatypes"
|
17
|
"\bserial( NOT NULL\b)?","int(11)\1 AUTO_INCREMENT",
|
18
|
"oid","int(11)",
|
19
|
"Integer","int(11)",
|
20
|
"Boolean","int(1)",
|
21
|
"bytea","blob",
|
22
|
" with time zone\b",,
|
23
|
"fulltext","\g<0>__",
|
24
|
"\btimestamp\b(?: with time zone\b)?(?! NOT NULL\b)","\g<0> NULL",
|