1
|
"PostgreSQL","MySQL","Comments"
|
2
|
,,"PostgreSQL-only features"
|
3
|
"^SET\b[^;]*;",,
|
4
|
"^(?:CREATE|ALTER) (?:AGGREGATE|PROCEDURAL LANGUAGE|SEQUENCE|(?:CONSTRAINT )?TRIGGER|TYPE|VIEW)\b[^;]*;",,
|
5
|
"(?s)^CREATE FUNCTION\b.*?(\$\w*\$).*?\1;",,
|
6
|
"(?s)^COMMENT\b.*?';$",,
|
7
|
"^ALTER TABLE\b[^;]*\bSET DEFAULT nextval\([^;]*\)[^;]*;",,
|
8
|
"^CREATE\b[^;]*\bINDEX\b[^;]*\([^;]*\([^;]*;",,
|
9
|
",\n *CONSTRAINT\b.*\bCHECK\b.*?(?=,?$)",,
|
10
|
"\bDEFAULT \w*\(.*\)",,".* rather than .*? to allow nested ()"
|
11
|
"^(CREATE\b[^;]*\bINDEX\b[^;]*\b)USING \w+","\1",
|
12
|
"(?<=\bALTER TABLE )ONLY ",,
|
13
|
"\bINHERITS \(.*?\)",,
|
14
|
"\[\]",,"arrays"
|
15
|
,,"syntax changes"
|
16
|
"^--(?=\S)","\g<0> ",
|
17
|
"""([^""]*?)""","`\1`",
|
18
|
"(?<=DEFAULT )(\d+|'[^']*')::\w+(?: [a-z]+)*","\1",
|
19
|
"(\d+|'[^']*')::(\w+(?: \w+)*)","CAST(\1 AS \2)",
|
20
|
,,"datatypes"
|
21
|
"\bserial( NOT NULL\b)?","int(11)\1 AUTO_INCREMENT",
|
22
|
"oid","int(11)",
|
23
|
"integer","int(11)",
|
24
|
"boolean","int(1)",
|
25
|
"bytea","blob",
|
26
|
" with time zone\b",,
|
27
|
"fulltext","`\g<0>`",
|
28
|
"\btimestamp\b(?: with time zone\b)?(?! NOT NULL\b)","\g<0> NULL",
|
29
|
"^( *[a-z]\w* )(?!(?:date|datetime|double|int|text|time|timestamp)\b)\w+(?=\b[^;]*^\);)","\1text","custom types"
|