Project

General

Profile

1
PostgreSQL,MySQL,Comments
2
,,syntax changes
3
"(?s)^SET search_path = (.*?), pg_catalog;$",USE \1;,
4
(?s)(?<=^USE )public(?=;$),default_schema,
5
,,PostgreSQL-only features
6
(?s)^SET\b.*?;$,,
7
(?s)^(?:GRANT|REVOKE)\b.*?;$,,
8
(?s)^(?:CREATE|ALTER) (?:AGGREGATE|PROCEDURAL LANGUAGE|SEQUENCE|(?:CONSTRAINT )?TRIGGER|TYPE|VIEW)\b.*?;$,,
9
(?s)^CREATE FUNCTION\b.*?(\$\w*\$).*?\1;$,,
10
(?s)^COMMENT\b.*?';$,,
11
(?s)^ALTER TABLE\b[^;]*\bSET DEFAULT nextval\([^;]*\).*?;$,,
12
(?s)^CREATE\b[^;]*\bINDEX\b[^;]*\([^;]*\(.*?;$,,
13
",\n *CONSTRAINT\b.*\bCHECK\b.*?(?=,?$)",,
14
\bDEFAULT \w*\(.*\),,.* rather than .*? to allow nested ()
15
^(CREATE\b[^;]*\bINDEX\b[^;]*\b)USING \w+,\1,
16
(?s)^CREATE\b[^;]*\bINDEX\b[^;]*\bWHERE\b.*?;$,,
17
(?<=\bALTER TABLE )ONLY ,,
18
\bINHERITS \(.*?\),,
19
\[\],,arrays
20
(?s)^COPY\b.*?^\\\.$,,
21
^SELECT pg_catalog.setval\b.*?;$,,
22
\$\$\);\n(?:';\n)*,,left-behind lines
23
,,syntax changes
24
^--(?=\S),\g<0> ,
25
"""([^""]*?)""",`\1`,
26
(?<=DEFAULT )(\d+|'[^']*')::\w+(?: [a-z]+)*,\1,
27
(\d+|'[^']*')::(\w+(?: \w+)*),CAST(\1 AS \2),
28
,,datatypes
29
\bserial( NOT NULL\b)?,int(11)\1 AUTO_INCREMENT,
30
oid,int(11),
31
integer,int(11),
32
boolean,int(1),
33
\b(double) precision\b,\1,
34
bytea,blob,
35
 with time zone\b,,
36
fulltext,`\g<0>`,
37
\btimestamp\b(?: with time zone\b)?(?! NOT NULL\b),\g<0> NULL,
38
^( *`?[a-z]\w*`? )(?!(?:date|datetime|double|int|text|time|timestamp)\b)\w+(?=\b[^;]*^\);),\1text,custom types
39
text,varchar(255),text columns can't be used in indexes
(5-5/49)