Re: Recommended Protocol: Adding Rows to Table

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Recommended Protocol: Adding Rows to Table
Дата
Msg-id alpine.LNX.2.00.1111250845560.321@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Recommended Protocol: Adding Rows to Table  (David Johnston <polobo@yahoo.com>)
Ответы Re: Recommended Protocol: Adding Rows to Table
Список pgsql-general
On Fri, 25 Nov 2011, David Johnston wrote:

> Simplistically you load all the data into a staging table that has no
> natural primary key and then write a query that will result in only a
> single record for whatever you define as a primary key.  Insert the
> results of that query into the final table.

David,

   I was leaning toward doing this.

> If you only use a subset of columns to uniquely determine the PK than you
> need to decide how to resolve situations where the PK fields are
> duplicated but the extra fields are unique. That step is why the first
> description is simplistic.

   Well, that's point of a PK, isn't it? There should be only one row with
that specific set of column values. The additional columns are unique to
that set of PK values.

Thanks,

Rich

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: error when defining a search configuration named "default"
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Recommended Protocol: Adding Rows to Table