Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTASC-0000X0-8b for pgsql-general@arkaria.postgresql.org; Sun, 24 Dec 2017 17:52:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eTASB-0003Kk-O5 for pgsql-general@arkaria.postgresql.org; Sun, 24 Dec 2017 17:52:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eTASB-0003Kb-Gh for pgsql-general@lists.postgresql.org; Sun, 24 Dec 2017 17:52:51 +0000 Received: from mail.tamay-dogan.net ([78.47.247.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eTAS3-0003Oz-KL for pgsql-general@lists.postgresql.org; Sun, 24 Dec 2017 17:52:50 +0000 Received: from localhost (localhost [127.0.0.1]) (uid 33) by mail.tamay-dogan.net with local; Sun, 24 Dec 2017 18:52:39 +0100 id 0000000000001F45.5A3FE967.00003166 Received: from 37.157.109.77 (SquirrelMail authenticated user michelle.konzack) by webmail.tamay-dogan.net with HTTP; Sun, 24 Dec 2017 18:52:39 +0100 Message-ID: <491331d0766626e73f6028b0462629fa.squirrel@webmail.tamay-dogan.net> Date: Sun, 24 Dec 2017 18:52:39 +0100 Subject: Scheme conversion MySQL to PGSQL From: "Michelle Konzack" To: pgsql-general@lists.postgresql.org User-Agent: SquirrelMail/1.4.23 [SVN] Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) Importance: Normal OpenPGP: id=A5957FD8834573E2 X-Mime-Autoconverted: from 8bit to 7bit by courier 0.68 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello * I try to convert a Database scheme from mySQL to pgSQL and have problems with the line: KEY post_date (post_date) and later probably with the lines UNIQUE KEY user (stat_login) and KEY forum_id (forum_id) too. How to solv this prolem? Thanks Michelle ----8<---------------------------------------------------------------- CREATE TABLE sqmf_forum ( forum_id serial NOT NULL, forum_name varchar(50) NOT NULL, forum_description varchar(250) NOT NULL, forum_visible integer NOT NULL default '0', display_order integer NOT NULL default '1', PRIMARY KEY (forum_id) ); CREATE TABLE sqmf_post ( post_id serial NOT NULL, thread_id integer NOT NULL, post_login varchar NOT NULL, post_date timestamp NOT NULL, post_content text NOT NULL, PRIMARY KEY (post_id), KEY post_date (post_date) ); CREATE TABLE sqmf_stat ( stat_login varchar(70) NOT NULL, stat_post integer default '1', stat_thread integer default '1', PRIMARY KEY (stat_login), UNIQUE KEY user (stat_login) ); CREATE TABLE sqmf_thread ( thread_id serial NOT NULL, forum_id integer NOT NULL, thread_login varchar(70) NOT NULL, thread_date datetime NOT NULL, thread_title varchar(200) NOT NULL, thread_content longtext NOT NULL, nb_view integer NOT NULL default '0', nb_post integer NOT NULL default '1', last_post_date datetime NOT NULL, last_post_login varchar(70) NOT NULL, PRIMARY KEY (thread_id), KEY forum_id (forum_id) ); ----8<---------------------------------------------------------------- -- Michelle Konzack 00372-54541400