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
,,syntax changes
23
^--(?=\S),\g<0> ,
24
"""([^""]*?)""",`\1`,
25
(?<=DEFAULT )(\d+|'[^']*')::\w+(?: [a-z]+)*,\1,
26
(\d+|'[^']*')::(\w+(?: \w+)*),CAST(\1 AS \2),
27
,,datatypes
28
\bserial( NOT NULL\b)?,int(11)\1 AUTO_INCREMENT,
29
oid,int(11),
30
integer,int(11),
31
boolean,int(1),
32
bytea,blob,
33
 with time zone\b,,
34
fulltext,`\g<0>`,
35
\btimestamp\b(?: with time zone\b)?(?! NOT NULL\b),\g<0> NULL,
36
^( *`?[a-z]\w*`? )(?!(?:date|datetime|double|int|text|time|timestamp)\b)\w+(?=\b[^;]*^\);),\1text,custom types
37
text,varchar(255),text columns can't be used in indexes
(5-5/49)