Re: FW: Re: FW: Re: Shouldn;t this trigger be called?

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: FW: Re: FW: Re: Shouldn;t this trigger be called?
Дата
Msg-id CAHOFxGrZqPDOTheMT+kMb2sUSvg7SiFvr=d2-gugwxBr_mMDaw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: FW: Re: FW: Re: Shouldn;t this trigger be called?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: FW: Re: FW: Re: Shouldn;t this trigger be called?  (stan <stanb@panix.com>)
Re: FW: Re: FW: Re: Shouldn;t this trigger be called?  (stan <stanb@panix.com>)
Список pgsql-general
You can also look at citext type to avoid the casting.

    customer_key                integer DEFAULT nextval('customer_key_serial') PRIMARY KEY ,
    cust_no                     smallint NOT NULL UNIQUE ,
    name                        varchar UNIQUE ,

Why do you have a surrogate primary key generated by a sequence when you have a natural key of either cust_no or name? Why not just declare the customer number to be the PK? Where does customer number come from anyway? Using smallint seems potentially short-sighted on potential future growth, but changing the type later should be minimal work as long as you don't have this customer_number denormalized many places, or use it as the FKey after dropping customer_key surrogate key.

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: is it safe to drop 25 tb schema with cascade option?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: is it safe to drop 25 tb schema with cascade option?