Re: Scheme conversion MySQL to PGSQL

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Michelle Konzack <linux4michelle(at)tamay-dogan(dot)net>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Scheme conversion MySQL to PGSQL
Date: 2017-12-25 10:13:40
Message-ID: 40A1A9E2-75C6-4CDB-A786-402D03962CD0@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> On 24 Dec 2017, at 18:52, Michelle Konzack <linux4michelle(at)tamay-dogan(dot)net> wrote:

> 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)
> );

Just a minor observation, but a PRIMARY KEY is UNIQUE by definition. There's no need for that UNIQUE key "user" on the same field.

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michelle Konzack 2017-12-25 10:49:35 [OT] subscribtion with no-mail option?
Previous Message Ken Tanzer 2017-12-24 23:19:20 Re: Array of foreign key