Re: Upsert Functionality using CTEs - Mailing list pgsql-general

From Tim Uckun
Subject Re: Upsert Functionality using CTEs
Date
Msg-id CAGuHJrPqk7NaafqR-Z6Qc2j7ZkJ7bCSWmm8R+4prU1zx5ZszOQ@mail.gmail.com
Whole thread Raw
In response to Re: Upsert Functionality using CTEs  (Alban Hertroys <haramrae@gmail.com>)
List pgsql-general
> The best strategy is fixing your data-model so that you have a unique key. As you found out already, e-mail addresses
aren'tvery suitable as unique keys for people. For this particular case I'd suggest adding a surrogate key. 
>
> Alternatively, you might try using (first_name, email) as your key. You'll probably still get some duplicates, but
theyshould be less and perhaps few enough for your case. 
>

Yea I'll have to see if I can do a better match.

pgsql-general by date:

Previous
From: Roger Niederland
Date:
Subject: undefined symbol: SPI_plan_get_cached_plan
Next
From: "P. Broennimann"
Date:
Subject: Issue installing an extension