From 1a4597438f982a3c05dfb4f642182459f933f950 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 29 Jan 2006 08:55:51 +0000 Subject: [PATCH] Adding pgsql conversion info --- dev/pgsql_info.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 dev/pgsql_info.txt diff --git a/dev/pgsql_info.txt b/dev/pgsql_info.txt new file mode 100644 index 0000000..a3eaaff --- /dev/null +++ b/dev/pgsql_info.txt @@ -0,0 +1,16 @@ +Changes that will need to be made to support PostgreSQL: + +$Id$ +################################################################################ + +- All integers need to have their length dropped: int(20) goes to int +- Small integers int(2) et alter should be changed to smallint +- Cannot use REPLACE INTO x; need to delete records first or use UPDATE +- mediumtext needs to be converted to text +- Column renames need to be DB-specific. MySQL uses "ALTER TABLE x CHANGE y(def) TO z(def)" and PGSQL uses "ALTER TABLE x RENAME COLUMN y TO z" +- Joins need to be explicit "(INNER|LEFT|RIGHT) JOIN" instead of "WHERE x.a = y.a" +- AUTO_INCREMENT needs to be DB-specific switched to SERIAL without any integral information, but with primary-unique constraints +- Need change limiting agent from "LIMIT offset,max" and PGSQL uses "LIMIT max OFFSET offset" +- Fulltext searching is not supported in PGSQL, will need to rewrite searches to allow for some degree of niceness +- Need DB-specific DB->insert_id() for MySQL and DB->insert_id(table, column) for PGSQL +- FIND_IN_SET(find, field) needs to be "find = ANY(STRING_TO_ARRAY(field, ','))" \ No newline at end of file -- 2.22.5